PHP 클래스 Gdn_Module, vanilla

Provides basic functionality when extended by real modules.
부터: 2.0
저자: Mark O'Sullivan ([email protected])
저자: Todd Burry ([email protected])
상속: extends Gdn_Pluggable, implements Gdn_IModule
파일 보기 프로젝트 열기: vanilla/vanilla 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$AssetName The name of the current asset that is being rendered.
$Data Data that is passed into the view.
$Visible boolean

보호된 프로퍼티들

프로퍼티 타입 설명
$_ApplicationFolder The name of the application folder that this module resides within.
$_Sender The object that constructed this object. Typically this should be a Controller object.
$_ThemeFolder The name of the theme folder that the application is currently using.
$view The filename of view to render, excluding the extension.

공개 메소드들

메소드 설명
__construct ( object $Sender = '', $ApplicationFolder = false ) Class constructor
__toString ( ) : string Magic method for type casting to string.
allowed ( boolean | string | array $isAllowed ) : boolean Checks whether an item is allowed by returning it if it is already a boolean, or checking the permission if it is a string or array.
assetTarget ( ) Returns the name of the asset where this component should be rendered.
data ( null $Name = null, string $Default = '' ) : array | mixed
fetchView ( $view = '' ) : string Returns the xhtml for this module as a fully parsed and rendered string.
fetchViewLocation ( string $View = '', string $ApplicationFolder = '' ) : array Returns the location of the view for this module in the filesystem.
getView ( ) : string
name ( ) : string Returns the name of this module. Unless it is overridden, it will simply return the class name.
path ( boolean $NewValue = false ) : boolean | string
render ( ) Output HTML.
setData ( $Name, $Value )
setView ( string $view )
toString ( ) : string Returns the component as a string to be rendered to the screen.

메소드 상세

__construct() 공개 메소드

Class constructor
public __construct ( object $Sender = '', $ApplicationFolder = false )
$Sender object

__toString() 공개 메소드

Magic method for type casting to string.
public __toString ( ) : string
리턴 string

allowed() 공개 메소드

Checks whether an item is allowed by returning it if it is already a boolean, or checking the permission if it is a string or array.
public allowed ( boolean | string | array $isAllowed ) : boolean
$isAllowed boolean | string | array Either a boolean to indicate whether to actually add the item or a permission string or array of permission strings (full match) to check.
리턴 boolean Whether the item has permission to be added to the items list.

assetTarget() 공개 메소드

Returns the name of the asset where this component should be rendered.
public assetTarget ( )

data() 공개 메소드

public data ( null $Name = null, string $Default = '' ) : array | mixed
$Name null
$Default string
리턴 array | mixed

fetchView() 공개 메소드

Returns the xhtml for this module as a fully parsed and rendered string.
public fetchView ( $view = '' ) : string
리턴 string

fetchViewLocation() 공개 메소드

Returns the location of the view for this module in the filesystem.
public fetchViewLocation ( string $View = '', string $ApplicationFolder = '' ) : array
$View string
$ApplicationFolder string
리턴 array

getView() 공개 메소드

public getView ( ) : string
리턴 string The filename of view to render, excluding the extension.

name() 공개 메소드

Returns the name of this module. Unless it is overridden, it will simply return the class name.
public name ( ) : string
리턴 string

path() 공개 메소드

public path ( boolean $NewValue = false ) : boolean | string
$NewValue boolean
리턴 boolean | string

render() 공개 메소드

Output HTML.
public render ( )

setData() 공개 메소드

public setData ( $Name, $Value )
$Name
$Value

setView() 공개 메소드

public setView ( string $view )
$view string The filename of view to render, excluding the extension.

toString() 공개 메소드

Unless this method is overridden, it will attempt to find and return a view related to this module automatically.
public toString ( ) : string
리턴 string

프로퍼티 상세

$AssetName 공개적으로 프로퍼티

The name of the current asset that is being rendered.
public $AssetName

$Data 공개적으로 프로퍼티

Data that is passed into the view.
public $Data

$Visible 공개적으로 프로퍼티

public bool $Visible
리턴 boolean

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

The name of the application folder that this module resides within.
protected $_ApplicationFolder

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

The object that constructed this object. Typically this should be a Controller object.
protected $_Sender

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

The name of the theme folder that the application is currently using.
protected $_ThemeFolder

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

The filename of view to render, excluding the extension.
protected $view