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);
}