src/Contao/Event/Subscriber.php
private static function renderOptionValueReadable(RenderReadablePropertyValueEvent $event, $property, $value)
    {
        if (!($options = $property->getOptions())) {
            $options = self::getOptions($event->getEnvironment(), $event->getModel(), $event->getProperty());
            if ($options) {
                $property->setOptions($options);
            }
        }

        if (\array_is_assoc($options)) {
            $event->setRendered($options[$value]);
        }
    }
private static function renderOptionValueReadable(RenderReadablePropertyValueEvent $event, $property, $value)
    {
        if (!($options = $property->getOptions())) {
            $options = self::getOptions($event->getEnvironment(), $event->getModel(), $event->getProperty());
            if ($options) {
                $property->setOptions($options);
            }
        }

        if (\array_is_assoc($options)) {
            $event->setRendered($options[$value]);
        }
    }
private static function renderOptionValueReadable ( RenderReadablePropertyValueEvent $ event , $ property , $ value ) { if ( ! ( $ options = $ property -> getOptions ( ) ) ) { $ options = self :: getOptions ( $ event -> getEnvironment ( ) , $ event -> getModel ( ) , $ event -> getProperty ( ) ) ; if ( $ options ) { $ property -> setOptions ( $ options ) ; } } if ( \ array_is_assoc ( $ options ) ) { $ event -> setRendered ( $ options [ $ value ] ) ; } }
Render a property option.

@param RenderReadablePropertyValueEvent $event    The event to store the value to.
@param PropertyInterface                $property The property holding the options.
@param mixed                            $value    The value to format.

@return void
Render a property option .