registerEditor() публичный Метод

См. также: AdminAssets::registerEditor
public registerEditor ( )
Пример #1
0
 /**
  * Build the page and return the PageResponse.
  *
  * Checks for links, mounts etc.
  *
  * @return Response
  * @throws AccessDeniedException
  * @throws \Exception
  */
 public function handleAction()
 {
     $node = $this->pageStack->getCurrentPage();
     //is link
     if ($node->getType() == 1) {
         $to = $node->getLink();
         if (!$to) {
             throw new \Exception('Redirect failed: ' . sprintf('Current page with title %s has no target link.', $node->getTitle()));
         }
         if (intval($to) > 0) {
             return new RedirectResponse($this->pageStack->getNodeUrl($to), 301);
         } else {
             return new RedirectResponse($to, 301);
         }
     }
     if ($this->editMode->isEditMode()) {
         $this->editMode->registerEditor();
     }
     $pageResponse = $this->pageStack->getPageResponse();
     $pageResponse->renderContent();
     return $pageResponse;
     //new Response('<body>ho</body>');
 }