public function WeMegaMenuAdminController::renderBlock in Drupal Mega Menu 8
Same name and namespace in other branches
- 8.x src/Controller/WeMegaMenuAdminController.php \Drupal\we_megamenu\Controller\WeMegaMenuAdminController::renderBlock()
Render block from post variable ajax.
1 string reference to 'WeMegaMenuAdminController::renderBlock'
File
- src/
Controller/ WeMegaMenuAdminController.php, line 140
Class
- WeMegaMenuAdminController
- Controller routines for block example routes.
Namespace
Drupal\we_megamenu\ControllerCode
public function renderBlock() {
$title = TRUE;
if ($_POST['title'] == 0) {
$title = FALSE;
}
if (isset($_POST['bid']) && isset($_POST['section']) && !empty($_POST['bid'])) {
echo WeMegaMenuBuilder::renderBlock($_POST['bid'], $title, isset($_POST['section']));
}
else {
echo '';
}
exit;
}