code: public function buildWidget(BuildWidgetEvent $event)
      {
          if (!$this->wantToHandle($event)) {
              return;
          }
  
          $metaModel = $this->getMetaModelFromModel($event->getModel());
  
          Helper::prepareLanguageAwareWidget(
              $event->getEnvironment(),
              $event->getProperty(),
              $metaModel,
              $event->getEnvironment()->getTranslator()->translate('name_langcode', 'tl_metamodel_dcasetting'),
              $event->getEnvironment()->getTranslator()->translate('name_value', 'tl_metamodel_dcasetting'),
              false,
              StringUtil::deserialize($event->getModel()->getProperty('legendtitle'), true)
          );
      }
docs: Generate the widget.
  
  @param BuildWidgetEvent $event The event.
  
  @return void