Exemple #1
0
 /**
  * {@inheritdoc}
  */
 public function buildForm(array $form, array &$form_state, $pid = NULL)
 {
     $form = parent::buildForm($form, $form_state, $pid);
     $form['#title'] = String::checkPlain($this->path['alias']);
     $form['pid'] = array('#type' => 'hidden', '#value' => $this->path['pid']);
     $form['actions']['delete'] = array('#type' => 'submit', '#value' => $this->t('Delete'), '#submit' => array(array($this, 'deleteSubmit')));
     return $form;
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 public function buildForm(array $form, FormStateInterface $form_state, $pid = NULL)
 {
     $form = parent::buildForm($form, $form_state, $pid);
     $form['#title'] = $this->path['alias'];
     $form['pid'] = array('#type' => 'hidden', '#value' => $this->path['pid']);
     $form['actions']['delete'] = array('#type' => 'submit', '#value' => $this->t('Delete'), '#submit' => array('::deleteSubmit'));
     return $form;
 }
Exemple #3
0
 /**
  * {@inheritdoc}
  */
 public function buildForm(array $form, FormStateInterface $form_state, $pid = NULL)
 {
     $form = parent::buildForm($form, $form_state, $pid);
     $form['#title'] = $this->path['alias'];
     $form['pid'] = array('#type' => 'hidden', '#value' => $this->path['pid']);
     $url = new Url('path.delete', array('pid' => $this->path['pid']));
     if ($this->getRequest()->query->has('destination')) {
         $url->setOption('query', $this->getDestinationArray());
     }
     $form['actions']['delete'] = array('#type' => 'link', '#title' => $this->t('Delete'), '#url' => $url, '#attributes' => array('class' => array('button', 'button--danger')));
     return $form;
 }