Jarves\PageStack::setPageResponse PHP Метод

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

public setPageResponse ( PageResponse $pageResponse )
$pageResponse PageResponse
    public function setPageResponse(PageResponse $pageResponse)
    {
        $this->pageResponse = $pageResponse;
    }

Usage Example

Пример #1
0
 /**
  * @param Node|string|int $page Node model, url or node id. Use Jarves\Model\Node::createPage()
  * @param string|array|null $contents
  *
  * @return PageResponse
  */
 public function createFromPage($page, $contents = null)
 {
     $page = $this->pageStack->getPage($page);
     if (!$page) {
         throw new \InvalidArgumentException('Can not find page.');
     }
     $this->pageStack->setCurrentPage($page);
     $pageResponse = new PageResponse('', 200, [], $this->pageStack, $this->jarves, $this->stopwatch, $this->assetCompilerContainer, $this->eventDispatcher, $this->templating, $this->editMode);
     $this->pageStack->setPageResponse($pageResponse);
     if (null !== $contents) {
         $pageResponse->setPageContent($contents);
     }
     return $pageResponse;
 }
All Usage Examples Of Jarves\PageStack::setPageResponse