PHP 클래스 PicoExcerpt

This plugin exists for backward compatibility and is disabled by default. It gets automatically enabled when {@link PicoDeprecated} is enabled. You can avoid this by calling {@link PicoExcerpt::setEnabled()}. This plugin doesn't do its job very well and depends on {@link PicoParsePagesContent}, what heavily impacts Pico's performance. You should either use the Description meta header field or write something own. Best solution seems to be a filter for twig, see e.g. {@link https://gist.github.com/james2doyle/6629712}.
저자: Daniel Rudolf
상속: extends AbstractPicoPlugin
파일 보기 프로젝트 열기: gilbitron/pico

보호된 프로퍼티들

프로퍼티 타입 설명
$dependsOn This plugin depends on PicoParsePagesContent
$enabled This plugin is disabled by default

공개 메소드들

메소드 설명
onConfigLoaded ( array &$config ) Adds the default excerpt length of 50 words to the config
onSinglePageLoaded ( array &$pageData ) Creates a excerpt for the contents of each page

보호된 메소드들

메소드 설명
createExcerpt ( string $string, integer $wordLimit ) : string Helper function to create a excerpt of a string

메소드 상세

createExcerpt() 보호된 메소드

Helper function to create a excerpt of a string
protected createExcerpt ( string $string, integer $wordLimit ) : string
$string string the string to create a excerpt from
$wordLimit integer the maximum number of words the excerpt should be long
리턴 string excerpt of $string

onConfigLoaded() 공개 메소드

Adds the default excerpt length of 50 words to the config
또한 보기: DummyPlugin::onConfigLoaded()
public onConfigLoaded ( array &$config )
$config array

onSinglePageLoaded() 공개 메소드

Creates a excerpt for the contents of each page
또한 보기: PicoExcerpt::createExcerpt()
또한 보기: DummyPlugin::onSinglePageLoaded()
public onSinglePageLoaded ( array &$pageData )
$pageData array

프로퍼티 상세

$dependsOn 보호되어 있는 프로퍼티

This plugin depends on PicoParsePagesContent
또한 보기: PicoParsePagesContent
또한 보기: AbstractPicoPlugin::$dependsOn
protected $dependsOn

$enabled 보호되어 있는 프로퍼티

This plugin is disabled by default
또한 보기: AbstractPicoPlugin::$enabled
protected $enabled