Backend\Classes\FormTabs

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

Implements:

  • 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 string $defaultTab

Default tab label to use when none is specified.

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.
Parameters
  • 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.

Parameters
  • 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 ArrayIterator getIterator()

Get an iterator for the items.

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

Returns a tab pane CSS class.

Parameters
  • string $index
  • string $label

public boolean hasFields()

Returns true if any fields have been registered for these tabs

public void offsetExists($offset)

ArrayAccess implementation

Parameters
  • $offset

public void offsetGet($offset)

ArrayAccess implementation

Parameters
  • $offset

public void offsetSet($offset, $value)

ArrayAccess implementation

Parameters
  • $offset
  • $value

public void offsetUnset($offset)

ArrayAccess implementation

Parameters
  • $offset

public boolean removeField(string $name)

Remove a field from all tabs by name.

Parameters
  • string $name

Protected methods

protected array evalConfig(array $config)

Process options and apply them to this object.

Parameters
  • array $config