public function WorkbenchContentController::editedContent in Workbench 8
Page callback for the workbench content page.
Note that we add Views information to the array and render the Views as part of the alter hook provided here.
Return value
array A Render API array of content creation options.
See also
hook_workbench_content_alter()
1 string reference to 'WorkbenchContentController::editedContent'
File
- src/
Controller/ WorkbenchContentController.php, line 83
Class
- WorkbenchContentController
- Generates the pages defined by Workbench.
Namespace
Drupal\workbench\ControllerCode
public function editedContent() {
$blocks = [];
$settings = $this
->getSettings();
$blocks['workbench_edited_content'] = [
'#view_id' => $settings['edits_main']['view_id'],
'#view_display' => $settings['edits_main']['display_id'],
'#attributes' => [
'class' => [
'workbench-full',
],
],
];
// Allow other modules to alter the default page.
$context = 'edits';
\Drupal::moduleHandler()
->alter('workbench_content', $blocks, $context);
return $this
->renderBlocks($blocks);
}