Backend\Classes\FormTabs

Implements:

  • IteratorAggregate
  • ArrayAccess
  • Traversable

FormTabs is a translation of the form field tab configuration

Public properties

public string $section

section specifies the form section these tabs belong to

public array $fields

fields is a collection of panes fields to these tabs

public array $lazy

lazy is the n Names of tabs to lazy load

public string $defaultTab

defaultTab is default tab label to use when none is specified

public array $icons

icons lists of icons for their corresponding tabs

public bool $stretch

stretch should these tabs stretch to the bottom of the page layout

public boolean $suppressTabs

suppressTabs if set to TRUE, fields will not be displayed in tabs

public string $cssClass

cssClass cpecifies a CSS class to attach to the tab container

public array $paneCssClass

paneCssClass specifies a CSS class to an individual tab pane

public bool $linkable

linkable means tab gets url fragment to be linkable

Public methods

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

__construct 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)

addField to the collection of tabs

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

public array getAllFields()

getAllFields returns an array of the registered fields, without tabs

public array getFields()

getFields returns an array of the registered fields, including tabs

public string getIcon(string $name)

getIcon returns an icon for the tab based on the tab's name

Parameters
  • string $name

public ArrayIterator getIterator()

getIterator gets an iterator for the items

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

getPaneCssClass returns a tab pane CSS class

Parameters
  • string $index
  • string $label

public boolean hasFields()

hasFields returns true if any fields have been registered for these tabs

public void offsetExists($offset)

offsetExists is an ArrayAccess implementation

Parameters
  • $offset

public void offsetGet($offset)

offsetGet is an ArrayAccess implementation

Parameters
  • $offset

public void offsetSet($offset, $value)

offsetSet is an ArrayAccess implementation

Parameters
  • $offset
  • $value

public void offsetUnset($offset)

offsetUnset is an ArrayAccess implementation

Parameters
  • $offset

public boolean removeField(string $name)

removeField from all tabs by name

Parameters
  • string $name

Protected methods

protected void evalConfig($config)

evalConfig process options and apply them to this object

Parameters
  • $config