PHP 트레잇 Contao\TemplateInheritance

파일 보기 프로젝트 열기: contao/core-bundle

보호된 프로퍼티들

프로퍼티 타입 설명
$arrBlockNames array Block names
$arrBlocks array Blocks
$strDefault string Default template
$strFormat string Output format
$strParent string Parent template
$strTagEnding string Tag ending
$strTemplate string Template file

공개 메소드들

메소드 설명
block ( string $name ) Start a new block
endblock ( ) End a block
extend ( string $name ) Extend another template
inherit ( ) : string Parse the template file and return it as string
insert ( string $name, array $data = null ) Insert a template
parent ( ) Insert the content of the parent block

보호된 메소드들

메소드 설명
getTemplatePath ( string $strTemplate, string $strFormat = 'html5', boolean $blnDefault = false ) : string Find a particular template file and return its path

메소드 상세

block() 공개 메소드

Start a new block
public block ( string $name )
$name string The block name

endblock() 공개 메소드

End a block
public endblock ( )

extend() 공개 메소드

Extend another template
public extend ( string $name )
$name string The template name

getTemplatePath() 보호된 메소드

Find a particular template file and return its path
protected getTemplatePath ( string $strTemplate, string $strFormat = 'html5', boolean $blnDefault = false ) : string
$strTemplate string The name of the template
$strFormat string The file extension
$blnDefault boolean If true, the default template path is returned
리턴 string The path to the template file

inherit() 공개 메소드

Parse the template file and return it as string
public inherit ( ) : string
리턴 string The template markup

insert() 공개 메소드

Insert a template
public insert ( string $name, array $data = null )
$name string The template name
$data array An optional data array

parent() 공개 메소드

Insert the content of the parent block
public parent ( )

프로퍼티 상세

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

Block names
protected array $arrBlockNames
리턴 array

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

Blocks
protected array $arrBlocks
리턴 array

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

Default template
protected string $strDefault
리턴 string

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

Output format
protected string $strFormat
리턴 string

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

Parent template
protected string $strParent
리턴 string

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

Tag ending
protected string $strTagEnding
리턴 string

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

Template file
protected string $strTemplate
리턴 string