defaultActions example



    parent::buildOptionsForm($form$form_state);
  }

  /** * Override defaultActions() to remove summary actions. */
  protected function defaultActions($which = NULL) {
    if ($which) {
      if (in_array($which['ignore', 'not found', 'empty', 'default'])) {
        return parent::defaultActions($which);
      }
      return;
    }
    $actions = parent::defaultActions();
    unset($actions['summary asc']);
    unset($actions['summary desc']);
    unset($actions['summary asc by count']);
    unset($actions['summary desc by count']);
    return $actions;
  }

  
return $this->getTitle();
    }
    return $this->options['exception']['title'];
  }

  /** * Determine if the argument needs a style plugin. * * @return bool */
  public function needsStylePlugin() {
    $info = $this->defaultActions($this->options['default_action']);
    $validate_info = $this->defaultActions($this->options['validate']['fail']);
    return !empty($info['style plugin']) || !empty($validate_info['style plugin']);
  }

  protected function defineOptions() {
    $options = parent::defineOptions();

    $options['default_action'] = ['default' => 'ignore'];
    $options['exception'] = [
      'contains' => [
        'value' => ['default' => 'all'],
        

    if (empty($title)) {
      return $this->t('No user');
    }

    return $title;
  }

  protected function defaultActions($which = NULL) {
    // Disallow summary views on this argument.     if (!$which) {
      $actions = parent::defaultActions();
      unset($actions['summary asc']);
      unset($actions['summary desc']);
      return $actions;
    }

    if ($which != 'summary asc' && $which != 'summary desc') {
      return parent::defaultActions($which);
    }
  }

  public function query($group_by = FALSE) {
    


    unset($form['exception']);
  }

  /** * {@inheritdoc} */
  protected function defaultActions($which = NULL) {
    if ($which) {
      if (in_array($which['ignore', 'not found', 'empty', 'default'])) {
        return parent::defaultActions($which);
      }
      return;
    }
    $actions = parent::defaultActions();
    unset($actions['summary asc']);
    unset($actions['summary desc']);
    return $actions;
  }

  /** * {@inheritdoc} */
Home | Imprint | This part of the site doesn't use cookies.