core-bundle/src/DataContainer/PaletteManipulator.php
private function findLegendForField(array &$config, string $field)
    {
        foreach ($config as $legend => $group) {
            if (\in_array($field, $group['fields'], true)) {
                return $legend;
            }
        }

        return false;
    }
private function findLegendForField(array &$config, string $field)
    {
        foreach ($config as $legend => $group) {
            if (\in_array($field, $group['fields'], true)) {
                return $legend;
            }
        }

        return false;
    }
private function findLegendForField ( array & $ config , string $ field ) { foreach ( $ config as $ legend => $ group ) { if ( \ in_array ( $ field , $ group [ 'fields' ] , true ) ) { return $ legend ; } } return false ; }
Having the same field in multiple legends is not supported by Contao, so we don't handle that case.

@return string|false
Having the same field in multiple legends is not supported by Contao so we don t handle that case .