public function decodeValue(DecodePropertyValueForWidgetEvent $event)
    {
        if (!$this->wantToHandle($event)) {
            return;
        }

        if (is_array($event->getValue())) {
            $values = [];

            foreach ($event->getValue() as $value) {
                $values[] = 'value_' . $value;
            }

            // Cut off the 'value_' prefix.
            $event->setValue($values);
        } else {
            $event->setValue('value_' . $event->getValue());
        }
    }
public function decodeValue(DecodePropertyValueForWidgetEvent $event)
    {
        if (!$this->wantToHandle($event)) {
            return;
        }

        if (is_array($event->getValue())) {
            $values = [];

            foreach ($event->getValue() as $value) {
                $values[] = 'value_' . $value;
            }

            // Cut off the 'value_' prefix.
            $event->setValue($values);
        } else {
            $event->setValue('value_' . $event->getValue());
        }
    }
public function decodeValue ( DecodePropertyValueForWidgetEvent $ event ) { if ( ! $ this -> wantToHandle ( $ event ) ) { return ; } if ( is_array ( $ event -> getValue ( ) ) ) { $ values = [ ] ; foreach ( $ event -> getValue ( ) as $ value ) { $ values [ ] = 'value_' . $ value ; } // Cut off the 'value_' prefix. $ event -> setValue ( $ values ) ; } else { $ event -> setValue ( 'value_' . $ event -> getValue ( ) ) ; } }
Translates an value to a generated alias to allow numeric values.

@param DecodePropertyValueForWidgetEvent $event The event.

@return void
Translates an value to a generated alias to allow numeric values .