src/CoreBundle/EventListener/DcGeneral/Table/Attribute/NameAndDescriptionListener.php
public function buildWidget(BuildWidgetEvent $event)
    {
        if (!($this->wantToHandle($event) && \in_array($event->getProperty()->getName(), ['name', 'description']))) {
            return;
        }

        $metaModel = $this->getMetaModelByModelPid($event->getModel());

        Helper::prepareLanguageAwareWidget(
            $event->getEnvironment(),
            $event->getProperty(),
            $metaModel,
            $this->translator->trans('tl_metamodel_attribute.name_langcode', [], 'contao_tl_metamodel_attribute'),
            $this->translator->trans('tl_metamodel_attribute.name_value', [], 'contao_tl_metamodel_attribute'),
            false,
            StringUtil::deserialize($event->getModel()->getProperty($event->getProperty()->getName()), true)
        );
    }
public function buildWidget(BuildWidgetEvent $event)
    {
        if (!($this->wantToHandle($event) && \in_array($event->getProperty()->getName(), ['name', 'description']))) {
            return;
        }

        $metaModel = $this->getMetaModelByModelPid($event->getModel());

        Helper::prepareLanguageAwareWidget(
            $event->getEnvironment(),
            $event->getProperty(),
            $metaModel,
            $this->translator->trans('tl_metamodel_attribute.name_langcode', [], 'contao_tl_metamodel_attribute'),
            $this->translator->trans('tl_metamodel_attribute.name_value', [], 'contao_tl_metamodel_attribute'),
            false,
            StringUtil::deserialize($event->getModel()->getProperty($event->getProperty()->getName()), true)
        );
    }
Build the widget for the MCW.

@param BuildWidgetEvent $event The event.

@return void