class ModeratedContentController

Same name and namespace in other branches
  1. 11.x core/modules/content_moderation/src/Controller/ModeratedContentController.php \Drupal\content_moderation\Controller\ModeratedContentController

Defines a controller to list moderated nodes.

Hierarchy

Expanded class hierarchy of ModeratedContentController

File

core/modules/content_moderation/src/Controller/ModeratedContentController.php, line 11

Namespace

Drupal\content_moderation\Controller
View source
class ModeratedContentController extends ControllerBase {
  
  /**
   * Provides the listing page for moderated nodes.
   *
   * @return array
   *   A render array as expected by
   *   \Drupal\Core\Render\RendererInterface::render().
   */
  public function nodeListing() {
    $entity_type = $this->entityTypeManager()
      ->getDefinition('node');
    return $this->entityTypeManager()
      ->createHandlerInstance(ModeratedNodeListBuilder::class, $entity_type)
      ->render();
  }

}

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