You are here

ModeratedContentController.php in Drupal 8

File

core/modules/content_moderation/src/Controller/ModeratedContentController.php
View source
<?php

namespace Drupal\content_moderation\Controller;

use Drupal\content_moderation\ModeratedNodeListBuilder;
use Drupal\Core\Controller\ControllerBase;

/**
 * Defines a controller to list moderated nodes.
 */
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();
  }

}

Classes

Namesort descending Description
ModeratedContentController Defines a controller to list moderated nodes.