/** * {@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); }
/** * {@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); }
/** * 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); }
/** * {@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); }
/** * {@inheritdoc} */ protected function init(FormStateInterface $form_state) { parent::init($form_state); $this->entityType = $this->entityManager->getDefinition($this->entity->getEntityTypeId()); }
/** * {@inheritdoc} */ protected function init(array &$form_state) { parent::init($form_state); $this->entityType = $this->entityManager->getDefinition($this->entity->getEntityTypeId()); }