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
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$AssetName The name of the current asset that is being rendered.
$Data Data that is passed into the view.
$Visible boolean

Защищенные свойства (Protected)

Свойство Тип Описание
$_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