PHP Класс Horde_Core_Block, horde

Copyright 2003-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Автор: Mike Cochrane ([email protected])
Автор: Jan Schneider ([email protected])
Автор: Michael Slusarz ([email protected])
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$autoUpdateMethod string The method to use to render the block when Horde_Ajax_Application_Handler#blockAutoUpdate is called instead of the default of Horde_Core_Block#getContent By default, we call _content()
$enabled boolean Is this block enabled?
$updateable boolean Whether this block has changing content.

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

Свойство Тип Описание
$_app string Application that this block originated from.
$_name string Block name. Should be set in the constructor.
$_params array Block specific parameters.

Открытые методы

Метод Описание
__construct ( string $app, array | boolean $params = [] ) Constructor.
getAjaxUpdate ( Horde_Variables $vars ) : string The data to send on an AJAX update request.
getApp ( ) : string Returns the application that this block belongs to.
getContent ( ) : string Returns the content for this block.
getName ( ) : string Return the block name.
getParamValues ( ) : array Returns a hash of block parameters and their configured values.
getParams ( ) : array Returns any settable parameters for this block.
getTitle ( ) : string Returns the text to go in the title of this block.
refreshContent ( Horde_Variables $vars ) : string Returns the content for this block in response to a user requested update from within the block.

Защищенные методы

Метод Описание
_ajaxUpdate ( Horde_Variables $vars ) : string Returns this block's content for AJAX updates.
_ajaxUpdateUrl ( ) : Horde_Url Return the URL to use for AJAX update requests.
_call ( string $name, mixed $default, mixed $args = null ) : mixed Calls the application driver in the proper context.
_content ( ) : string Returns this block's content.
_params ( ) : array Returns the parameters needed by block.
_refreshContent ( Horde_Variables $vars ) : string Stub to be overridden by concrete block that supports user-initiated updating of content via ajax.
_title ( ) : string Returns the title to go in this block.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( string $app, array | boolean $params = [] )
$app string The application name.
$params array | boolean Any parameters the block needs. If false, the default parameter will be used.

_ajaxUpdate() защищенный Метод

Returns this block's content for AJAX updates.
protected _ajaxUpdate ( Horde_Variables $vars ) : string
$vars Horde_Variables The form variables for the request.
Результат string The update content.

_ajaxUpdateUrl() защищенный Метод

Return the URL to use for AJAX update requests.
protected _ajaxUpdateUrl ( ) : Horde_Url
Результат Horde_Url The update URL.

_call() защищенный Метод

Calls the application driver in the proper context.
protected _call ( string $name, mixed $default, mixed $args = null ) : mixed
$name string string
$default mixed
$args mixed
Результат mixed

_content() абстрактный защищенный Метод

Returns this block's content.
abstract protected _content ( ) : string
Результат string The block's content.

_params() защищенный Метод

Returns the parameters needed by block.
protected _params ( ) : array
Результат array The block's parameters.

_refreshContent() защищенный Метод

Stub to be overridden by concrete block that supports user-initiated updating of content via ajax.
protected _refreshContent ( Horde_Variables $vars ) : string
$vars Horde_Variables
Результат string

_title() защищенный Метод

Returns the title to go in this block.
protected _title ( ) : string
Результат string The block title.

getAjaxUpdate() публичный Метод

The data to send on an AJAX update request.
public getAjaxUpdate ( Horde_Variables $vars ) : string
$vars Horde_Variables The form variables for the request.
Результат string Update data.

getApp() публичный Метод

Returns the application that this block belongs to.
public getApp ( ) : string
Результат string The application name.

getContent() публичный Метод

This function handles the changing of current application as needed so code is executed in the scope of the application the block originated from.
public getContent ( ) : string
Результат string The block's content.

getName() публичный Метод

Return the block name.
public getName ( ) : string
Результат string The block name.

getParamValues() публичный Метод

Returns a hash of block parameters and their configured values.
public getParamValues ( ) : array
Результат array Parameter values.

getParams() публичный Метод

It does *not* reference $this->_params; that is for runtime parameters (the choices made from these options).
public getParams ( ) : array
Результат array The block's configurable parameters.

getTitle() публичный Метод

This function handles the changing of current application as needed so code is executed in the scope of the application the block originated from.
public getTitle ( ) : string
Результат string The block's title.

refreshContent() публичный Метод

This function handles the changing of current application as needed so code is executed in the scope of the application the block originated from.
public refreshContent ( Horde_Variables $vars ) : string
$vars Horde_Variables
Результат string The block's content.

Описание свойств

$_app защищенное свойство

Application that this block originated from.
protected string $_app
Результат string

$_name защищенное свойство

Block name. Should be set in the constructor.
protected string $_name
Результат string

$_params защищенное свойство

Block specific parameters.
protected array $_params
Результат array

$autoUpdateMethod публичное свойство

The method to use to render the block when Horde_Ajax_Application_Handler#blockAutoUpdate is called instead of the default of Horde_Core_Block#getContent By default, we call _content()
С версии: 2.12.0
public string $autoUpdateMethod
Результат string

$enabled публичное свойство

Is this block enabled?
public bool $enabled
Результат boolean

$updateable публичное свойство

Whether this block has changing content.
public bool $updateable
Результат boolean