src/Contao/View/Contao2BackendView/ContaoWidgetManager.php
public function encodeValue($property, $value, PropertyValueBag $propertyValues)
    {
        $environment = $this->getEnvironment();

        $event = new EncodePropertyValueFromWidgetEvent($environment, $this->model, $propertyValues);
        $event
            ->setProperty($property)
            ->setValue($value);

        $environment->getEventDispatcher()->dispatch(EncodePropertyValueFromWidgetEvent::NAME, $event);

        return $event->getValue();
    }
public function encodeValue($property, $value, PropertyValueBag $propertyValues)
    {
        $environment = $this->getEnvironment();

        $event = new EncodePropertyValueFromWidgetEvent($environment, $this->model, $propertyValues);
        $event
            ->setProperty($property)
            ->setValue($value);

        $environment->getEventDispatcher()->dispatch(EncodePropertyValueFromWidgetEvent::NAME, $event);

        return $event->getValue();
    }
public function encodeValue ( $ property , $ value , PropertyValueBag $ propertyValues ) { $ environment = $ this -> getEnvironment ( ) ; $ event = new EncodePropertyValueFromWidgetEvent ( $ environment , $ this -> model , $ propertyValues ) ; $ event -> setProperty ( $ property ) -> setValue ( $ value ) ; $ environment -> getEventDispatcher ( ) -> dispatch ( EncodePropertyValueFromWidgetEvent :: NAME , $ event ) ; return $ event -> getValue ( ) ; }
Encode a value from the widget to native data of the data provider via event.

@param string           $property       The property.
@param mixed            $value          The value of the property.
@param PropertyValueBag $propertyValues The property value bag the property value originates from.

@return mixed
Encode a value from the widget to native data of the data provider via event .