public function buildOptionsForm(&$form, &$form_state)
 {
     parent::buildOptionsForm($form, $form_state);
     if (\Drupal::moduleHandler()->moduleExists('comment')) {
         $form['comments'] = array('#type' => 'checkbox', '#title' => t('Check for new comments as well'), '#default_value' => !empty($this->options['comments']));
     }
 }
示例#2
0
 /**
  * Provide machine_name option for to node type display.
  */
 public function buildOptionsForm(&$form, &$form_state)
 {
     parent::buildOptionsForm($form, $form_state);
     $form['machine_name'] = array('#title' => t('Output machine name'), '#description' => t('Display field as the content type machine name.'), '#type' => 'checkbox', '#default_value' => !empty($this->options['machine_name']));
 }
示例#3
0
 public function buildOptionsForm(&$form, FormStateInterface $form_state)
 {
     parent::buildOptionsForm($form, $form_state);
     $form['native_language'] = array('#title' => $this->t('Native language'), '#type' => 'checkbox', '#default_value' => $this->options['native_language'], '#description' => $this->t('If enabled, the native name of the language will be displayed'));
 }
示例#4
0
 /**
  * Provide link to revision option.
  */
 public function buildOptionsForm(&$form, FormStateInterface $form_state)
 {
     $form['link_to_node_revision'] = array('#title' => $this->t('Link this field to its content revision'), '#description' => $this->t('This will override any other link you have set.'), '#type' => 'checkbox', '#default_value' => !empty($this->options['link_to_node_revision']));
     parent::buildOptionsForm($form, $form_state);
 }