PHP Class Yosymfony\Spress\Core\ContentManager\Generator\Pagination\PaginationGenerator

Example of URLs generated: /page2 ... How to configure? (Front matter block of the template page): --- layout: "default" generator: "pagination" max_page: 5 provider: "site.posts" permalink: "/page:num" sort_by: "date" sort_type: "descendant" ---
Author: Victor Puertas ([email protected])
Inheritance: implements Yosymfony\Spress\Core\ContentManager\Generator\GeneratorInterface
Show file Open project: spress/spress Class Usage Examples

Public Methods

Method Description
generateItems ( Yosymfony\Spress\Core\DataSource\ItemInterface $templateItem, array $collections )

Protected Methods

Method Description
getAttributesResolver ( Yosymfony\Spress\Core\DataSource\ItemInterface $templateItem )
getPagePermalink ( $pageRelativePath )
getPageRelativePath ( $basePath, $template, $page )
getProviderItems ( array $collections, $providerName, $templateItemPath )
providerToCollection ( $providerName )
sortItemsByAttribute ( array $items, $attribute, $sortType )

Method Details

generateItems() public method

public generateItems ( Yosymfony\Spress\Core\DataSource\ItemInterface $templateItem, array $collections )
$templateItem Yosymfony\Spress\Core\DataSource\ItemInterface
$collections array

getAttributesResolver() protected method

protected getAttributesResolver ( Yosymfony\Spress\Core\DataSource\ItemInterface $templateItem )
$templateItem Yosymfony\Spress\Core\DataSource\ItemInterface

getPageRelativePath() protected method

protected getPageRelativePath ( $basePath, $template, $page )

getProviderItems() protected method

protected getProviderItems ( array $collections, $providerName, $templateItemPath )
$collections array

providerToCollection() protected method

protected providerToCollection ( $providerName )

sortItemsByAttribute() protected method

protected sortItemsByAttribute ( array $items, $attribute, $sortType )
$items array