Documentation

FormTabs
in package
implements IteratorAggregate, ArrayAccess

Form Tabs definition A translation of the form field tab configuration

Tags
author

Alexey Bobkov, Samuel Georges

Interfaces, Classes and Traits

IteratorAggregate
ArrayAccess

Table of Contents

SECTION_OUTSIDE  = 'outside'
SECTION_PRIMARY  = 'primary'
SECTION_SECONDARY  = 'secondary'
$cssClass  : string
$defaultTab  : string
$fields  : array<string|int, mixed>
$icons  : array<string|int, mixed>
$lazy  : array<string|int, mixed>
$linkable  : bool
$paneCssClass  : array<string|int, mixed>
$section  : string
$stretch  : bool
$suppressTabs  : bool
__construct()  : mixed
Constructor.
addField()  : mixed
Add a field to the collection of tabs.
getAllFields()  : array<string|int, mixed>
Returns an array of the registered fields, without tabs.
getFields()  : array<string|int, mixed>
Returns an array of the registered fields, including tabs.
getIcon()  : string
Returns an icon for the tab based on the tab's name.
getIterator()  : ArrayIterator
Get an iterator for the items.
getPaneCssClass()  : string
Returns a tab pane CSS class.
hasFields()  : bool
Returns true if any fields have been registered for these tabs
offsetExists()  : mixed
ArrayAccess implementation
offsetGet()  : mixed
ArrayAccess implementation
offsetSet()  : mixed
ArrayAccess implementation
offsetUnset()  : mixed
ArrayAccess implementation
removeField()  : bool
Remove a field from all tabs by name.
evalConfig()  : array<string|int, mixed>
Process options and apply them to this object.

Constants

SECTION_OUTSIDE

public mixed SECTION_OUTSIDE = 'outside'

SECTION_PRIMARY

public mixed SECTION_PRIMARY = 'primary'

SECTION_SECONDARY

public mixed SECTION_SECONDARY = 'secondary'

Properties

$cssClass

public string $cssClass

Specifies a CSS class to attach to the tab container.

$defaultTab

public string $defaultTab = 'backend::lang.form.undefined_tab'

Default tab label to use when none is specified.

$fields

public array<string|int, mixed> $fields = []

Collection of panes fields to these tabs.

$icons

public array<string|int, mixed> $icons = []

List of icons for their corresponding tabs.

$lazy

public array<string|int, mixed> $lazy = []

Names of tabs to lazy load.

$linkable

public bool $linkable = true

Each tab gets url fragment to be linkable.

$paneCssClass

public array<string|int, mixed> $paneCssClass

Specifies a CSS class to an individual tab pane.

$section

public string $section = 'outside'

Specifies the form section these tabs belong to.

$stretch

public bool $stretch

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

$suppressTabs

public bool $suppressTabs = false

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

Methods

__construct()

Constructor.

public __construct(string $section[, array<string|int, mixed> $config = [] ]) : mixed

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
$section : string

Specifies a section as described above.

$config : array<string|int, mixed> = []

A list of render mode specific config.

Return values
mixed

addField()

Add a field to the collection of tabs.

public addField(string $name, FormField $field[, string $tab = null ]) : mixed
Parameters
$name : string
$field : FormField
$tab : string = null
Return values
mixed

getAllFields()

Returns an array of the registered fields, without tabs.

public getAllFields() : array<string|int, mixed>
Return values
array<string|int, mixed>

getFields()

Returns an array of the registered fields, including tabs.

public getFields() : array<string|int, mixed>
Return values
array<string|int, mixed>

getIcon()

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

public getIcon(string $name) : string
Parameters
$name : string
Return values
string

getIterator()

Get an iterator for the items.

public getIterator() : ArrayIterator
Return values
ArrayIterator

getPaneCssClass()

Returns a tab pane CSS class.

public getPaneCssClass([string $index = null ][, string $label = null ]) : string
Parameters
$index : string = null
$label : string = null
Return values
string

hasFields()

Returns true if any fields have been registered for these tabs

public hasFields() : bool
Return values
bool

offsetExists()

ArrayAccess implementation

public offsetExists(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetGet()

ArrayAccess implementation

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetSet()

ArrayAccess implementation

public offsetSet(mixed $offset, mixed $value) : mixed
Parameters
$offset : mixed
$value : mixed
Return values
mixed

offsetUnset()

ArrayAccess implementation

public offsetUnset(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

removeField()

Remove a field from all tabs by name.

public removeField(string $name) : bool
Parameters
$name : string
Return values
bool

evalConfig()

Process options and apply them to this object.

protected evalConfig(array<string|int, mixed> $config) : array<string|int, mixed>
Parameters
$config : array<string|int, mixed>
Return values
array<string|int, mixed>

Search results