/**
  * {@inheritdoc}
  */
 public function buildForm(array $form, FormStateInterface $form_state, LanguageInterface $language = NULL)
 {
     if ($language) {
         $form_state->set('langcode', $language->getId());
     }
     return parent::buildForm($form, $form_state);
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function buildForm(array $form, FormStateInterface $form_state)
 {
     $instances = $this->entity->getInstances();
     $form['message'] = array('#markup' => $this->formatPlural(count($instances), 'This will also remove 1 placed block instance.', 'This will also remove @count placed block instances.'), '#access' => !empty($instances));
     return parent::buildForm($form, $form_state);
 }