function content_moderation_views_post_execute

Implements hook_views_post_execute().

File

core/modules/content_moderation/content_moderation.module, line 436

Code

function content_moderation_views_post_execute(ViewExecutable $view) {
  // @todo, remove this once broken handlers in views configuration result in
  // a view no longer returning results. https://www.drupal.org/node/2907954.
  foreach ($view->filter as $id => $filter) {
    if (strpos($id, 'moderation_state') === 0 && $filter instanceof Broken) {
      $view->result = [];
      break;

    }
  }
}

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