コード例 #1
0
 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
ファイル: Type.php プロジェクト: alnutile/drunatra
 /**
  * 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
ファイル: Language.php プロジェクト: anyforsoft/csua_d8
 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
ファイル: Revision.php プロジェクト: Nikola-xiii/d8intranet
 /**
  * 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);
 }