You are here

public function AdminController::adminPage in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/comment/src/Controller/AdminController.php \Drupal\comment\Controller\AdminController::adminPage()

Presents an administrative comment listing.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The request of the page.

string $type: The type of the overview form ('approval' or 'new') default to 'new'.

Return value

array Then comment multiple delete confirmation form or the comments overview administration form.

1 string reference to 'AdminController::adminPage'
comment.routing.yml in core/modules/comment/comment.routing.yml
core/modules/comment/comment.routing.yml

File

core/modules/comment/src/Controller/AdminController.php, line 58
Contains \Drupal\comment\Controller\AdminController.

Class

AdminController
Returns responses for comment module administrative routes.

Namespace

Drupal\comment\Controller

Code

public function adminPage(Request $request, $type = 'new') {
  if ($request->request
    ->get('operation') == 'delete' && $request->request
    ->get('comments')) {
    return $this->formBuilder
      ->getForm('\\Drupal\\comment\\Form\\ConfirmDeleteMultiple', $request);
  }
  else {
    return $this->formBuilder
      ->getForm('\\Drupal\\comment\\Form\\CommentAdminOverview', $type);
  }
}