/** * {@inheritdoc} */ public function save(array $form, FormStateInterface $form_state) { parent::save($form, $form_state); $t_args = array('%language' => $this->entity->label(), '%langcode' => $this->entity->id()); $this->logger('language')->notice('The %language (%langcode) language has been created.', $t_args); drupal_set_message($this->t('The language %language has been created and can now be used.', $t_args)); if ($this->moduleHandler->moduleExists('block')) { // Tell the user they have the option to add a language switcher block // to their theme so they can switch between the languages. drupal_set_message($this->t('Use one of the language switcher blocks to allow site visitors to switch between languages. You can enable these blocks on the <a href="@block-admin">block administration page</a>.', array('@block-admin' => $this->url('block.admin_display')))); } $form_state->setRedirectUrl($this->entity->urlInfo('collection')); }
/** * {@inheritdoc} */ public function save(array $form, FormStateInterface $form_state) { parent::save($form, $form_state); $form_state->setRedirectUrl($this->entity->urlInfo('collection')); $this->logger('language')->notice('The %language (%langcode) language has been updated.', array('%language' => $this->entity->label(), '%langcode' => $this->entity->id())); }
/** * {@inheritdoc} */ public function form(array $form, array &$form_state) { $this->commonForm($form); return parent::form($form, $form_state); }
/** * {@inheritdoc} */ public function form(array $form, FormStateInterface $form_state) { $this->commonForm($form); return parent::form($form, $form_state); }