code: protected function build(IMetaModelDataDefinition $container)
      {
          $inputScreen = $this->viewCombination->getScreen($container->getName());
          if (!$inputScreen) {
              return;
          }
          $meta = $inputScreen['meta'];
  
          $config = $this->getOrCreateBasicDefinition($container);
  
          $config->setDataProvider($container->getName());
  
          $metaModel = $this->factory->getMetaModel($container->getName());
          // If we have variants, override all modes to tree mode.
          if ($metaModel->hasVariants()) {
              $config->setMode(BasicDefinitionInterface::MODE_HIERARCHICAL);
          }
  
          if ('hierarchical' === $meta['rendermode']) {
              // Hierarchical mode - Records are displayed as tree (see site structure).
              $config->setMode(BasicDefinitionInterface::MODE_HIERARCHICAL);
          } elseif ('parented' === $meta['rendermode']) {
              // Displays the child records of a parent record (see style sheets module).
              $config->setMode(BasicDefinitionInterface::MODE_PARENTEDLIST);
          } elseif ('flat' === $meta['rendermode']) {
              // Flat mode.
              $config->setMode(BasicDefinitionInterface::MODE_FLAT);
          }
  
          $config
              ->setEditable((bool) $meta['iseditable'])
              ->setCreatable((bool) $meta['iscreatable'])
              ->setDeletable((bool) $meta['isdeleteable']);
  
          if ($metaModel->hasVariants()) {
              ConditionBuilderWithVariants::calculateConditions($container, $inputScreen);
              return;
          }
          ConditionBuilderWithoutVariants::calculateConditions($container, $inputScreen);
      }
docs: Build the definition.
  
  @param IMetaModelDataDefinition $container The container being built.
  
  @return void