Source: ~/modules/backend/classes/FormTabs.php


  • IteratorAggregate
  • Traversable
  • ArrayAccess

Form Tabs definition A translation of the form field tab configuration

Public properties

public string $section

Specifies the form section these tabs belong to.

public array $fields

Collection of panes fields to these tabs.

public array $lazy

Names of tabs to lazy load.

public string $defaultTab

Default tab label to use when none is specified.

public array $icons

List of icons for their corresponding tabs.

public bool $stretch

Should these tabs stretch to the bottom of the page layout.

public boolean $suppressTabs

If set to TRUE, fields will not be displayed in tabs.

public string $cssClass

Specifies a CSS class to attach to the tab container.

public array $paneCssClass

Specifies a CSS class to an individual tab pane.

Public methods

public void __construct(string $section, array $config=array())

Constructor. Specifies a tabs rendering section. Supported sections are:

  • outside - stores a section of "tabless" fields.
  • primary - tabs section for primary fields.
  • secondary - tabs section for secondary fields.
  • string $section - Specifies a section as described above.
  • array $config - A list of render mode specific config.

public void addField(string $name, FormField $field, string $tab=NULL)

Add a field to the collection of tabs.

  • string $name
  • FormField $field
  • string $tab

public array getAllFields()

Returns an array of the registered fields, without tabs.

public array getFields()

Returns an array of the registered fields, including tabs.

public string getIcon(string $name)

Returns an icon for the tab based on the tab's name.

  • string $name

public ArrayIterator getIterator()

Get an iterator for the items.

public string getPaneCssClass(string $index=NULL, string $label=NULL)

Returns a tab pane CSS class.

  • string $index
  • string $label

public boolean hasFields()

Returns true if any fields have been registered for these tabs

public void offsetExists($offset)

ArrayAccess implementation

  • $offset

public void offsetGet($offset)

ArrayAccess implementation

  • $offset

public void offsetSet($offset, $value)

ArrayAccess implementation

  • $offset
  • $value

public void offsetUnset($offset)

ArrayAccess implementation

  • $offset

public boolean removeField(string $name)

Remove a field from all tabs by name.

  • string $name

Protected methods

protected array evalConfig(array $config)

Process options and apply them to this object.

  • array $config