function content_moderation_views_post_execute

Same name in other branches
  1. 9 core/modules/content_moderation/content_moderation.module \content_moderation_views_post_execute()
  2. 8.9.x core/modules/content_moderation/content_moderation.module \content_moderation_views_post_execute()
  3. 11.x core/modules/content_moderation/content_moderation.module \content_moderation_views_post_execute()

Implements hook_views_post_execute().

File

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

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 (str_starts_with($id, 'moderation_state') && $filter instanceof Broken) {
            $view->result = [];
            break;
        }
    }
}

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