Change Title of RelationManager

Is it correct that I need to use this method to change the title of a RelationManager?
public function getTitle(): string
{
return __('strings.models.communications.plural');
}
public function getTitle(): string
{
return __('strings.models.communications.plural');
}
This however doesn't work and I need to change it to:
public function getTitle(Model $ownerRecord, string $pageClass): string
{
return __('strings.models.communications.plural');
}
public function getTitle(Model $ownerRecord, string $pageClass): string
{
return __('strings.models.communications.plural');
}
Or is there something else I have to use?
1 Reply
jelmerkeij
jelmerkeij16mo ago
Hi Daniel, try this:
/**
* @param Model $ownerRecord
* @param string $pageClass
*
* @return string
*/
public static function getTitle( Model $ownerRecord, string $pageClass ): string {
return __('strings.models.communications.plural');
}
/**
* @param Model $ownerRecord
* @param string $pageClass
*
* @return string
*/
public static function getTitle( Model $ownerRecord, string $pageClass ): string {
return __('strings.models.communications.plural');
}
In the specific RelationManager itself of course.
Want results from more Discord servers?
Add your server