PHP Класс Jarves\PageResponseFactory

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Jarves $jarves, PageStack $pageStack, StopwatchHelper $stopwatch, Container $assetCompilerContainer, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher, Symfony\Component\Templating\EngineInterface $templating, EditMode $editMode, Router $router, Cacher $cacher )
create ( $data = '' ) : PageResponse
createFromPage ( Node | string | integer $page, string | array | null $contents = null ) : PageResponse
createFromPageWithBody ( string $view, array $parameters = [], Node $page = null ) : PageResponse Creates a new PageResponse object based on a Node object.
createFromRoute ( null $routeName = null, string | array | null $contents = null ) : PageResponse Creates a new PageResponse object based on the current found route (using Symfony's router) or using $routeName.
createFromRouteWithBody ( string $view, array $parameters = [], null | string $routeName = null ) : PageResponse Creates a new PageResponse object based on the current found route (using Symfony's router) or using $routeName.
createPageFromRoute ( string | null $routeName = null ) : Node Creates a Node object based on given $routeName or current route.
createPluginResponse ( $data = '' ) : PageResponse

Описание методов

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

public __construct ( Jarves $jarves, PageStack $pageStack, StopwatchHelper $stopwatch, Container $assetCompilerContainer, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher, Symfony\Component\Templating\EngineInterface $templating, EditMode $editMode, Router $router, Cacher $cacher )
$jarves Jarves
$pageStack PageStack
$stopwatch StopwatchHelper
$assetCompilerContainer Jarves\AssetHandler\Container
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$templating Symfony\Component\Templating\EngineInterface
$editMode EditMode
$router Symfony\Component\Routing\Router
$cacher Jarves\Cache\Cacher

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

public create ( $data = '' ) : PageResponse
Результат PageResponse

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

public createFromPage ( Node | string | integer $page, string | array | null $contents = null ) : PageResponse
$page Jarves\Model\Node | string | integer Node model, url or node id. Use Jarves\Model\Node::createPage()
$contents string | array | null
Результат PageResponse

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

If you've a theme then you could specify "theme" at the route options (to have a custom doctype/base template) Note: The actual rendering of $view is delayed to the PageResponse::prepare() which is called shortly before sending the request.
public createFromPageWithBody ( string $view, array $parameters = [], Node $page = null ) : PageResponse
$view string
$parameters array
$page Jarves\Model\Node
Результат PageResponse

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

You need to define at your routes additional options: title, theme, layout.
public createFromRoute ( null $routeName = null, string | array | null $contents = null ) : PageResponse
$routeName null Per default current route name, if available
$contents string | array | null
Результат PageResponse

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

If you've a theme then you could specify "theme" at the route options (to have a custom doctype/base template) Note: The actual rendering of $view is delayed to the PageResponse::prepare() which is called shortly before sending the request.
public createFromRouteWithBody ( string $view, array $parameters = [], null | string $routeName = null ) : PageResponse
$view string
$parameters array
$routeName null | string
Результат PageResponse

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

Creates a Node object based on given $routeName or current route.
public createPageFromRoute ( string | null $routeName = null ) : Node
$routeName string | null
Результат Jarves\Model\Node

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

public createPluginResponse ( $data = '' ) : PageResponse
Результат PageResponse