PHP 클래스 Bolt\Controller\Frontend

This file acts as a grouping for the default front-end controllers. For overriding the default behavior here, please reference https://docs.bolt.cm/templating/templates-routes#routing or the routing.yml file in your configuration.
상속: extends ConfigurableBase
파일 보기 프로젝트 열기: bolt/bolt 1 사용 예제들

공개 메소드들

메소드 설명
after ( Request $request, Response $response )
before ( Request $request ) : null | TemplateResponse | RedirectResponse The default before filter for the controllers in this file.
homepage ( Request $request ) : TemplateResponse Controller for the "Homepage" route. Usually the front page of the website.
listing ( Request $request, string $contenttypeslug ) : TemplateResponse The listing page controller.
preview ( Request $request, string $contenttypeslug ) : TemplateResponse The controller for previewing a content from posted data.
record ( Request $request, string $contenttypeslug, string $slug = '' ) : TemplateResponse Controller for a single record page, like '/page/about/' or '/entry/lorum'.
search ( Request $request, array $contenttypes = null ) : TemplateResponse The search result page controller.
taxonomy ( Request $request, string $taxonomytype, string $slug ) : TemplateResponse | false The taxonomy listing page controller.
template ( string $template ) : TemplateResponse Renders the specified template from the current theme in response to a request without loading any content.

보호된 메소드들

메소드 설명
addRoutes ( Silex\ControllerCollection $c )
getConfigurationRoutes ( )
isTaxonomyValid ( Content $content, string $slug, array $taxonomy ) : boolean Check if the taxonomy is valid.

비공개 메소드들

메소드 설명
getListingOrder ( array $contentType ) : null | string Return the listing order.
getListingParameters ( string $contentTypeSlug ) : array Returns an array of the parameters used in getContent for listing pages.

메소드 상세

addRoutes() 보호된 메소드

protected addRoutes ( Silex\ControllerCollection $c )
$c Silex\ControllerCollection

after() 공개 메소드

public after ( Request $request, Response $response )
$request Symfony\Component\HttpFoundation\Request
$response Symfony\Component\HttpFoundation\Response

before() 공개 메소드

Refer to the routing.yml config file for overridding.
public before ( Request $request ) : null | TemplateResponse | RedirectResponse
$request Symfony\Component\HttpFoundation\Request The Symfony Request
리턴 null | Bolt\Response\TemplateResponse | Symfony\Component\HttpFoundation\RedirectResponse

getConfigurationRoutes() 보호된 메소드

protected getConfigurationRoutes ( )

homepage() 공개 메소드

Controller for the "Homepage" route. Usually the front page of the website.
public homepage ( Request $request ) : TemplateResponse
$request Symfony\Component\HttpFoundation\Request
리턴 Bolt\Response\TemplateResponse

isTaxonomyValid() 보호된 메소드

Check if the taxonomy is valid.
또한 보기: https://github.com/bolt/bolt/pull/2310
protected isTaxonomyValid ( Content $content, string $slug, array $taxonomy ) : boolean
$content Bolt\Legacy\Content
$slug string
$taxonomy array
리턴 boolean

listing() 공개 메소드

The listing page controller.
public listing ( Request $request, string $contenttypeslug ) : TemplateResponse
$request Symfony\Component\HttpFoundation\Request The Symfony Request
$contenttypeslug string The content type slug
리턴 Bolt\Response\TemplateResponse

preview() 공개 메소드

The controller for previewing a content from posted data.
public preview ( Request $request, string $contenttypeslug ) : TemplateResponse
$request Symfony\Component\HttpFoundation\Request The Symfony Request
$contenttypeslug string The content type slug
리턴 Bolt\Response\TemplateResponse

record() 공개 메소드

Controller for a single record page, like '/page/about/' or '/entry/lorum'.
public record ( Request $request, string $contenttypeslug, string $slug = '' ) : TemplateResponse
$request Symfony\Component\HttpFoundation\Request The request
$contenttypeslug string The content type slug
$slug string The content slug
리턴 Bolt\Response\TemplateResponse

taxonomy() 공개 메소드

The taxonomy listing page controller.
public taxonomy ( Request $request, string $taxonomytype, string $slug ) : TemplateResponse | false
$request Symfony\Component\HttpFoundation\Request The Symfony Request
$taxonomytype string The taxonomy type slug
$slug string The taxonomy slug
리턴 Bolt\Response\TemplateResponse | false

template() 공개 메소드

Renders the specified template from the current theme in response to a request without loading any content.
public template ( string $template ) : TemplateResponse
$template string The template name
리턴 Bolt\Response\TemplateResponse