private function applyFieldToLegend(array &$config, array $action, $skipLegends = false)
{
// If $skipLegends is true, we usually only have one legend without name, so we simply append to that
if ($skipLegends) {
if (self::POSITION_PREPEND === $action['position']) {
reset($config);
} else {
end($config);
}
$action['parents'] = [key($config)];
}
if ($this->canApplyToParent($config, $action, 'parents', 'position')) {
return;
}
$this->applyFallback($config, $action, $skipLegends);
}