If you have Edit form and Relation Managers, did you know that you can combine them and transform the Edit form as one of the Tabs in Relations? Let's see how.
By default, when you add a relation manager to the resource, they are added below the edit or view form.
You can change that and combine it with the form tabs, which will add them at the top of the form. In the Edit or View page class, set the hasCombinedRelationManagerTabsWithContent()
method to true.
public function hasCombinedRelationManagerTabsWithContent(): bool{ return true;}
But the edit page tab has a Edit
label by default.
We can change this label by setting it using the getContentTabLabel()
method in the Edit or View page class.
public function getContentTabLabel(): ?string{ return 'Customers';}
A few of our Premium Examples: