src/Contao/Subscriber/FormatModelLabelSubscriber.php
private function prepareLabelArguments(
        $propertyNames,
        PropertiesDefinitionInterface $properties,
        EnvironmentInterface $environment,
        ModelInterface $model
    ) {
        $args = [];
        foreach ($propertyNames as $propertyName) {
            if (!$properties->hasProperty($propertyName)) {
                $args[$propertyName] = '-';

                continue;
            }

            $args[$propertyName] = (string) ViewHelpers::getReadableFieldValue(
                $environment,
                $properties->getProperty($propertyName),
                $model
            );
        }

        return $args;
    }
private function prepareLabelArguments(
        $propertyNames,
        PropertiesDefinitionInterface $properties,
        EnvironmentInterface $environment,
        ModelInterface $model
    ) {
        $args = [];
        foreach ($propertyNames as $propertyName) {
            if (!$properties->hasProperty($propertyName)) {
                $args[$propertyName] = '-';

                continue;
            }

            $args[$propertyName] = (string) ViewHelpers::getReadableFieldValue(
                $environment,
                $properties->getProperty($propertyName),
                $model
            );
        }

        return $args;
    }
private function prepareLabelArguments ( $ propertyNames , PropertiesDefinitionInterface $ properties , EnvironmentInterface $ environment , ModelInterface $ model ) { $ args = [ ] ; foreach ( $ propertyNames as $ propertyName ) { if ( ! $ properties -> hasProperty ( $ propertyName ) ) { $ args [ $ propertyName ] = '-' ; continue ; } $ args [ $ propertyName ] = ( string ) ViewHelpers :: getReadableFieldValue ( $ environment , $ properties -> getProperty ( $ propertyName ) , $ model ) ; } return $ args ; }
Prepare the arguments for the label formatter.

@param string[]                      $propertyNames The properties.
@param PropertiesDefinitionInterface $properties    The property definition.
@param EnvironmentInterface          $environment   The environment.
@param ModelInterface                $model         The model.

@return array
Prepare the arguments for the label formatter .