src/Contao/View/Contao2BackendView/ActionHandler/ShowHandler.php
protected function getPropertyLabel(EnvironmentInterface $environment, PropertyInterface $property)
    {
        $translator = $environment->getTranslator();

        $label = $translator->translate($property->getLabel(), $environment->getDataDefinition()->getName());
        if (!$label) {
            $label = $translator->translate('MSC.' . $property->getName());
        }

        if (\is_array($label)) {
            $label = $label[0];
        }

        if (!$label) {
            $label = $property->getName();
        }

        return $label;
    }
protected function getPropertyLabel(EnvironmentInterface $environment, PropertyInterface $property)
    {
        $translator = $environment->getTranslator();

        $label = $translator->translate($property->getLabel(), $environment->getDataDefinition()->getName());
        if (!$label) {
            $label = $translator->translate('MSC.' . $property->getName());
        }

        if (\is_array($label)) {
            $label = $label[0];
        }

        if (!$label) {
            $label = $property->getName();
        }

        return $label;
    }
protected function getPropertyLabel ( EnvironmentInterface $ environment , PropertyInterface $ property ) { $ translator = $ environment -> getTranslator ( ) ; $ label = $ translator -> translate ( $ property -> getLabel ( ) , $ environment -> getDataDefinition ( ) -> getName ( ) ) ; if ( ! $ label ) { $ label = $ translator -> translate ( 'MSC.' . $ property -> getName ( ) ) ; } if ( \ is_array ( $ label ) ) { $ label = $ label [ 0 ] ; } if ( ! $ label ) { $ label = $ property -> getName ( ) ; } return $ label ; }
Calculate the label of a property to se in "show" view.

@param EnvironmentInterface $environment The environment.
@param PropertyInterface    $property    The property for which the label shall be calculated.

@return string
Calculate the label of a property to se in show view .