當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。