当前位置: 首页>>代码示例>>PHP>>正文


PHP EntityForm::init方法代码示例

本文整理汇总了PHP中Drupal\Core\Entity\EntityForm::init方法的典型用法代码示例。如果您正苦于以下问题:PHP EntityForm::init方法的具体用法?PHP EntityForm::init怎么用?PHP EntityForm::init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Drupal\Core\Entity\EntityForm的用法示例。


在下文中一共展示了EntityForm::init方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 /**
  * {@inheritdoc}
  */
 public function init(FormStateInterface $form_state)
 {
     parent::init($form_state);
     // @todo Remove the need for this.
     $form_state->loadInclude('views_ui', 'inc', 'admin');
     $form_state->set('view', $this->entity);
 }
开发者ID:nstielau,项目名称:drops-8,代码行数:10,代码来源:ViewFormBase.php

示例2: init

 /**
  * {@inheritdoc}
  */
 protected function init(FormStateInterface $form_state)
 {
     parent::init($form_state);
     $form_state->set(['entity_browser', 'instance_uuid'], \Drupal::service('uuid')->generate());
     $form_state->set(['entity_browser', 'selected_entities'], []);
     $form_state->set(['entity_browser', 'selection_completed'], FALSE);
 }
开发者ID:DrupalTV,项目名称:DrupalTV,代码行数:10,代码来源:EntityBrowserForm.php

示例3: init

 /**
  * Initialize the form state and the entity before the first form build.
  */
 protected function init(FormStateInterface $form_state)
 {
     // Ensure we act on the translation object corresponding to the current form
     // language.
     $langcode = $this->getFormLangcode($form_state);
     $this->entity = $this->entity->getTranslation($langcode);
     $form_display = EntityFormDisplay::collectRenderDisplay($this->entity, $this->getOperation());
     $this->setFormDisplay($form_display, $form_state);
     parent::init($form_state);
 }
开发者ID:davidsoloman,项目名称:drupalconsole.com,代码行数:13,代码来源:ContentEntityForm.php

示例4: init

 /**
  * {@inheritdoc}
  */
 public function init(FormStateInterface $form_state)
 {
     parent::init($form_state);
     if ($display_id = \Drupal::request()->attributes->get('display_id')) {
         $this->displayID = $display_id;
     }
     // @todo Remove the need for this.
     form_load_include($form_state, 'inc', 'views_ui', 'admin');
     $form_state->set('view', $this->entity);
 }
开发者ID:anatalsceo,项目名称:en-classe,代码行数:13,代码来源:ViewFormBase.php

示例5: init

 /**
  * {@inheritdoc}
  */
 protected function init(FormStateInterface $form_state)
 {
     parent::init($form_state);
     $this->entityType = $this->entityManager->getDefinition($this->entity->getEntityTypeId());
 }
开发者ID:ddrozdik,项目名称:dmaps,代码行数:8,代码来源:EntityDisplayModeFormBase.php

示例6: init

 /**
  * {@inheritdoc}
  */
 protected function init(array &$form_state)
 {
     parent::init($form_state);
     $this->entityType = $this->entityManager->getDefinition($this->entity->getEntityTypeId());
 }
开发者ID:alnutile,项目名称:drunatra,代码行数:8,代码来源:EntityDisplayModeFormBase.php


注:本文中的Drupal\Core\Entity\EntityForm::init方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。