MetaModels\DcGeneral\Events\Table\InputScreens\Subscriber::decodeLegendTitleValue PHP Method

decodeLegendTitleValue() public method

Decode the title value.
public decodeLegendTitleValue ( ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\DecodePropertyValueForWidgetEvent $event ) : void
$event ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\DecodePropertyValueForWidgetEvent The event.
return void
    public function decodeLegendTitleValue(DecodePropertyValueForWidgetEvent $event)
    {
        if ($event->getEnvironment()->getDataDefinition()->getName() !== 'tl_metamodel_dcasetting' || $event->getProperty() !== 'legendtitle') {
            return;
        }
        $metaModel = $this->getMetaModelFromModel($event->getModel());
        $values = Helper::decodeLangArray($event->getValue(), $metaModel);
        $event->setValue($values);
    }