PHP 클래스 Frontend\Core\Engine\Base\Widget

저자: Tijs Verkoyen ([email protected])
저자: Dieter Vanden Eynde ([email protected])
저자: Matthias Mullie ([email protected])
상속: extends Object
파일 보기 프로젝트 열기: forkcms/forkcms 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$templatePath string Path to the template

보호된 프로퍼티들

프로퍼티 타입 설명
$action string The current action
$data mixed The data
$header Frontend\Core\Engine\Header The header object
$module string The current module

공개 메소드들

메소드 설명
__construct ( Symfony\Component\HttpKernel\KernelInterface $kernel, string $module, string $action, string $data = null )
addCSS ( string $file, boolean $overwritePath = false, boolean $minify = true, boolean $addTimestamp = null ) Add a CSS file into the array
addJS ( string $file, boolean $overwritePath = false, boolean $minify = true ) Add a javascript file into the array
addJSData ( string $key, mixed $value ) Add data that should be available in JS
createForm ( string | Symfony\Component\Form\FormTypeInterface $type, mixed $data = null, array $options = [] ) : Form Creates and returns a Form instance from the type of the form.
execute ( ) Execute the action If a javascript file with the name of the module or action exists it will be loaded.
getAction ( ) : string Get the action
getContent ( string $template = null ) : string Get parsed template content
getModule ( ) : string Get the module
getTemplate ( ) : string Get template
redirect ( string $url, integer $code = 302 ) Redirect to a given URL

보호된 메소드들

메소드 설명
loadTemplate ( string $path = null ) Load the template
setTemplatePath ( string $path ) Set the path for the template to include or to replace the current one

비공개 메소드들

메소드 설명
setAction ( string $action ) Set the action, for later use
setData ( string $data = null ) Set the data, for later use
setModule ( string $module ) Set the module, for later use

메소드 상세

__construct() 공개 메소드

public __construct ( Symfony\Component\HttpKernel\KernelInterface $kernel, string $module, string $action, string $data = null )
$kernel Symfony\Component\HttpKernel\KernelInterface
$module string The module to use.
$action string The action to use.
$data string The data that should be available.

addCSS() 공개 메소드

Add a CSS file into the array
public addCSS ( string $file, boolean $overwritePath = false, boolean $minify = true, boolean $addTimestamp = null )
$file string The path for the CSS-file that should be loaded.
$overwritePath boolean Whether or not to add the module to this path. Module path is added by default.
$minify boolean Should the CSS be minified?
$addTimestamp boolean May we add a timestamp for caching purposes?

addJS() 공개 메소드

Add a javascript file into the array
public addJS ( string $file, boolean $overwritePath = false, boolean $minify = true )
$file string The path to the javascript-file that should be loaded.
$overwritePath boolean Whether or not to add the module to this path. Module path is added by default.
$minify boolean Should the file be minified?

addJSData() 공개 메소드

Add data that should be available in JS
public addJSData ( string $key, mixed $value )
$key string The key whereunder the value will be stored.
$value mixed The value to pass.

createForm() 공개 메소드

Creates and returns a Form instance from the type of the form.
public createForm ( string | Symfony\Component\Form\FormTypeInterface $type, mixed $data = null, array $options = [] ) : Form
$type string | Symfony\Component\Form\FormTypeInterface The built type of the form
$data mixed The initial data for the form
$options array Options for the form
리턴 Symfony\Component\Form\Form

execute() 공개 메소드

Execute the action If a javascript file with the name of the module or action exists it will be loaded.
public execute ( )

getAction() 공개 메소드

Get the action
public getAction ( ) : string
리턴 string

getContent() 공개 메소드

Get parsed template content
public getContent ( string $template = null ) : string
$template string
리턴 string

getModule() 공개 메소드

Get the module
public getModule ( ) : string
리턴 string

getTemplate() 공개 메소드

Get template
public getTemplate ( ) : string
리턴 string

loadTemplate() 보호된 메소드

Load the template
protected loadTemplate ( string $path = null )
$path string The path for the template to use.

redirect() 공개 메소드

Redirect to a given URL
public redirect ( string $url, integer $code = 302 )
$url string The URL whereto will be redirected.
$code integer The redirect code, default is 302 which means this is a temporary redirect.

setTemplatePath() 보호된 메소드

Set the path for the template to include or to replace the current one
protected setTemplatePath ( string $path )
$path string The path to the template that should be loaded.

프로퍼티 상세

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

The current action
protected string $action
리턴 string

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

The data
protected mixed $data
리턴 mixed

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

The header object
protected Header,Frontend\Core\Engine $header
리턴 Frontend\Core\Engine\Header

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

The current module
protected string $module
리턴 string

$templatePath 공개적으로 프로퍼티

Path to the template
public string $templatePath
리턴 string