Contao\CoreBundle\DataContainer\PaletteManipulator::applyFieldToField PHP Метод

applyFieldToField() приватный Метод

Adds a field after a field.
private applyFieldToField ( array &$config, array $action, boolean $skipLegends = false )
$config array
$action array
$skipLegends boolean
    private function applyFieldToField(array &$config, array $action, $skipLegends = false)
    {
        $offset = (int) (self::POSITION_AFTER === $action['position']);
        foreach ($action['parents'] as $parent) {
            $legend = $this->findLegendForField($config, $parent);
            if (false !== $legend) {
                $legend = (string) $legend;
                $offset += array_search($parent, $config[$legend]['fields'], true);
                array_splice($config[$legend]['fields'], $offset, 0, $action['fields']);
                return;
            }
        }
        $this->applyFallback($config, $action, $skipLegends);
    }