ModeratedContentController.php

Same filename in other branches
  1. 9 core/modules/content_moderation/src/Controller/ModeratedContentController.php
  2. 8.9.x core/modules/content_moderation/src/Controller/ModeratedContentController.php
  3. 10 core/modules/content_moderation/src/Controller/ModeratedContentController.php

Namespace

Drupal\content_moderation\Controller

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

Title Deprecated Summary
ModeratedContentController Defines a controller to list moderated nodes.

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