PHP Class Bolt\TemplateChooser

Afficher le fichier Open project: bolt/bolt Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Silex\Application $app ) Constructor.
homepage ( Content | Content[] $content ) : string Choose a template for the homepage.
listing ( array $contenttype ) : string Select a template for listing pages.
maintenance ( ) : string Select a template to use for the "maintenance" page.
record ( Content $record, array $data = null ) : string Choose a template for a single record page, e.g.: - '/page/about' - '/entry/lorum-ipsum'
search ( ) : string Select a search template.
taxonomy ( string $taxonomyslug ) : string Select a template for taxonomy.

Method Details

__construct() public méthode

Constructor.
public __construct ( Silex\Application $app )
$app Silex\Application

homepage() public méthode

Choose a template for the homepage.
public homepage ( Content | Content[] $content ) : string
$content Bolt\Legacy\Content | Bolt\Legacy\Content[]
Résultat string

listing() public méthode

Select a template for listing pages.
public listing ( array $contenttype ) : string
$contenttype array
Résultat string

maintenance() public méthode

Select a template to use for the "maintenance" page.
public maintenance ( ) : string
Résultat string

record() public méthode

Refactor note: Using a FQCN for the hint here as a use statement causes a fatal in the unit tests… 'cause PHP and class_alias() versus namespaces.
public record ( Content $record, array $data = null ) : string
$record Bolt\Legacy\Content
$data array
Résultat string

taxonomy() public méthode

Select a template for taxonomy.
public taxonomy ( string $taxonomyslug ) : string
$taxonomyslug string
Résultat string