예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function buildOptionsForm(&$form, &$form_state)
 {
     parent::buildOptionsForm($form, $form_state);
     $item_list = array('#theme' => 'item_list', '#items' => array('@start -- the initial record number in the set', '@end -- the last record number in the set', '@total -- the total records in the set', '@label -- the human-readable name of the view', '@per_page -- the number of items per page', '@current_page -- the current page number', '@current_record_count -- the current page record count', '@page_count -- the total page count'));
     $list = drupal_render($item_list);
     $form['content'] = array('#title' => t('Display'), '#type' => 'textarea', '#rows' => 3, '#default_value' => $this->options['content'], '#description' => t('You may use HTML code in this field. The following tokens are supported:') . $list);
 }
예제 #2
0
파일: Title.php 프로젝트: alnutile/drunatra
 /**
  * {@inheritdoc}
  */
 public function buildOptionsForm(&$form, &$form_state)
 {
     parent::buildOptionsForm($form, $form_state);
     $form['title'] = array('#type' => 'textfield', '#title' => t('Overridden title'), '#default_value' => $this->options['title'], '#description' => t('Override the title of this view when it is empty. The available global tokens below can be used here.'));
     // Don't use the AreaPluginBase tokenForm method, we don't want row tokens.
     $this->globalTokenForm($form, $form_state);
 }
예제 #3
0
 /**
  * {@inheritdoc}
  */
 public function buildOptionsForm(&$form, FormStateInterface $form_state)
 {
     parent::buildOptionsForm($form, $form_state);
     $view_display = $this->view->storage->id() . ':' . $this->view->current_display;
     $options = array('' => $this->t('-Select-'));
     $options += Views::getViewsAsOptions(FALSE, 'all', $view_display, FALSE, TRUE);
     $form['view_to_insert'] = array('#type' => 'select', '#title' => $this->t('View to insert'), '#default_value' => $this->options['view_to_insert'], '#description' => $this->t('The view to insert into this area.'), '#options' => $options);
     $form['inherit_arguments'] = array('#type' => 'checkbox', '#title' => $this->t('Inherit contextual filters'), '#default_value' => $this->options['inherit_arguments'], '#description' => $this->t('If checked, this view will receive the same contextual filters as its parent.'));
 }
예제 #4
0
 /**
  * {@inheritdoc}
  */
 public function buildOptionsForm(&$form, FormStateInterface $form_state)
 {
     parent::buildOptionsForm($form, $form_state);
     // Get all possible status codes defined by symfony.
     $options = Response::$statusTexts;
     // Move 403/404/500 to the top.
     $options = array('404' => $options['404'], '403' => $options['403'], '500' => $options['500']) + $options;
     // Add the HTTP status code, so it's easier for people to find it.
     array_walk($options, function ($title, $code) use(&$options) {
         $options[$code] = $this->t('@code (!title)', array('@code' => $code, '!title' => $title));
     });
     $form['status_code'] = array('#title' => $this->t('HTTP status code'), '#type' => 'select', '#default_value' => $this->options['status_code'], '#options' => $options);
 }
예제 #5
0
 /**
  * {@inheritdoc}
  */
 public function buildOptionsForm(&$form, FormStateInterface $form_state)
 {
     parent::buildOptionsForm($form, $form_state);
     $this->globalTokenForm($form, $form_state);
 }
 /**
  * {@inheritdoc}
  */
 public function buildOptionsForm(&$form, FormStateInterface $form_state)
 {
     parent::buildOptionsForm($form, $form_state);
     // Add tokenization form elements.
     $this->tokenForm($form, $form_state);
 }
예제 #7
0
 /**
  * {@inheritdoc}
  */
 public function buildOptionsForm(&$form, FormStateInterface $form_state)
 {
     parent::buildOptionsForm($form, $form_state);
 }