Example #1
0
 protected function valueForm(&$form, &$form_state)
 {
     parent::valueForm($form, $form_state);
     if (empty($form_state['exposed'])) {
         $this->helper->buildOptionsForm($form, $form_state);
     }
 }
Example #2
0
 protected function valueForm(&$form, FormStateInterface $form_state)
 {
     parent::valueForm($form, $form_state);
     if (!$form_state->get('exposed')) {
         $this->helper->buildOptionsForm($form, $form_state);
     }
 }
Example #3
0
  /**
   * {@inheritdoc}
   */
  protected function valueForm(&$form, FormStateInterface $form_state) {
    parent::valueForm($form, $form_state);
    // Apply cacheability metadata, because the parent class does not.
    // @todo Remove this once https://www.drupal.org/node/2754103 is fixed.
    $cacheability_metdata = CacheableMetadata::createFromObject($this);
    $cacheability_metdata->applyTo($form);

    return $form;
  }