function ContentModerationHooks::viewsPostExecute
Implements hook_views_post_execute().
File
-
core/
modules/ content_moderation/ src/ Hook/ ContentModerationHooks.php, line 362
Class
- ContentModerationHooks
- Hook implementations for content_moderation.
Namespace
Drupal\content_moderation\HookCode
public function viewsPostExecute(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.