Tab Page

This component allows you to add tab pages into other tab controls that are included in packages you do not have write access to. This is useful if for example, you wish to add an additional tab when managing user profiles to include data specific to your package. You may create a new tab page by using the create tab-page CLI command, such as:

apex create tab-page <PACKAGE> <PARENT> <ALIAS>

apex create tab-page transaction my-shop.order subscription

Using the above example, two new files named Subscription.php and Subscription.html will be created within the /src/Transaction/Opus/TabControls/MyShop_Order/ directory. . The PHP class has one method named process() and three properties, which are explaind below.

property Description
$parent_class Should not be modified, and simply defines the tab control this tab page is part of.
$name Name of the tab page to display within the web browser.
$position Position of the tab page relative to its siblings. see below for details.

Within the .html file, place the contents of the new tab page including any merge fields or foreach / if tags. When the tab control is displayed, the new tab page will be displayed in its proper location witht the .html file as its contents. The process() method of the PHP class will also be executed to gather any merge field variables or perform any necessary action specific to the page.

position Property

Allows you to define the position of the tab page relative to its siblings. Supports the following values:

  • top - First, left-most tab page.
  • bottom - Last, right-most tab page.
  • before <ALIAS> Just left of the ALIAS tab page.
  • after <ALIAS> - Just right of the ALIAS tab page.