PHP Класс Contao\CoreBundle\DataContainer\PaletteManipulator

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
addField ( string | array $name, string | array $parent, string $position = self::POSITION_AFTER, string | array | Closure | null $fallback = null, string $fallbackPosition = self::POSITION_APPEND ) : static Adds a new field.
addLegend ( string $name, string | array $parent, string $position = self::POSITION_AFTER, boolean $hide = false ) : static Adds a new legend.
applyToPalette ( string $name, string $table ) : static Applies the changes to a palette.
applyToString ( string $palette, boolean $skipLegends = false ) : string Applies the changes to a palette string.
applyToSubpalette ( string $name, string $table ) : static Applies the changes to a subpalette.
create ( ) : static Creates a new object instance.

Приватные методы

Метод Описание
applyFallback ( array &$config, array $action, boolean $skipLegends = false ) Applies the fallback when adding a field fails.
applyFallbackPalette ( array &$config, array $action ) Aplies the fallback to a palette.
applyField ( array &$config, array $action, boolean $skipLegends = false ) Adds a new field to the configuration array.
applyFieldToField ( array &$config, array $action, boolean $skipLegends = false ) Adds a field after a field.
applyFieldToLegend ( array &$config, array $action, boolean $skipLegends = false ) Adds fields to a legend.
applyLegend ( array &$config, array $action ) Adds a new legend to the configuration array.
canApplyToParent ( array &$config, array $action, string $key, string $position ) : boolean Tries to apply to a parent.
explode ( string $palette ) : array Converts a palette string to a configuration array.
findLegendForField ( array &$config, string $field ) : string | false Searches all legends for a field.
implode ( array $config ) : string Converts a configuration array to a palette string.
validatePosition ( string $position ) Validates the position.

Описание методов

addField() публичный Метод

If $position is PREPEND or APPEND, pass a legend as parent; otherwise pass a field name.
public addField ( string | array $name, string | array $parent, string $position = self::POSITION_AFTER, string | array | Closure | null $fallback = null, string $fallbackPosition = self::POSITION_APPEND ) : static
$name string | array
$parent string | array
$position string
$fallback string | array | Closure | null
$fallbackPosition string
Результат static

addLegend() публичный Метод

If the legend already exists, nothing will be changed.
public addLegend ( string $name, string | array $parent, string $position = self::POSITION_AFTER, boolean $hide = false ) : static
$name string
$parent string | array
$position string
$hide boolean
Результат static

applyToPalette() публичный Метод

Applies the changes to a palette.
public applyToPalette ( string $name, string $table ) : static
$name string
$table string
Результат static

applyToString() публичный Метод

Applies the changes to a palette string.
public applyToString ( string $palette, boolean $skipLegends = false ) : string
$palette string
$skipLegends boolean
Результат string

applyToSubpalette() публичный Метод

Applies the changes to a subpalette.
public applyToSubpalette ( string $name, string $table ) : static
$name string
$table string
Результат static

create() публичный статический Метод

Creates a new object instance.
public static create ( ) : static
Результат static