function GroupwiseMax::submitOptionsForm

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php \Drupal\views\Plugin\views\relationship\GroupwiseMax::submitOptionsForm()
  2. 10 core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php \Drupal\views\Plugin\views\relationship\GroupwiseMax::submitOptionsForm()
  3. 11.x core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php \Drupal\views\Plugin\views\relationship\GroupwiseMax::submitOptionsForm()

When the form is submitted, make sure to clear the subquery string cache.

Overrides PluginBase::submitOptionsForm

File

core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php, line 162

Class

GroupwiseMax
Relationship handler that allows a groupwise maximum of the linked in table. For a definition, see: <a href="http://dev.mysql.com/doc/refman/5.0/en/example-maximum-column-group-row.html">http://dev.mysql.com/doc/refman/5.0/en/example-maximum-column-group-row…</a> In lay terms, instead of joining to get all matching records in the…

Namespace

Drupal\views\Plugin\views\relationship

Code

public function submitOptionsForm(&$form, FormStateInterface $form_state) {
    $cid = 'views_relationship_groupwise_max:' . $this->view->storage
        ->id() . ':' . $this->view->current_display . ':' . $this->options['id'];
    \Drupal::cache('data')->delete($cid);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.