PHP Class Elgg\WidgetDefinition

Helper class for defining a widget
Afficher le fichier Open project: elgg/elgg Class Usage Examples

Méthodes publiques

Свойство Type Description
$context In which contexts is the widget available
$description Description of the widget
$id Identifier of the widget
$multiple Can the widget be added multiple times
$name Readable name of the widget

Méthodes publiques

Méthode Description
__construct ( string $id ) WidgetDefinition constructor
__get ( string $name ) : mixed Magic getter to return the deprecated attribute 'handler'
factory ( array $options ) : WidgetDefinition Create an WidgetDefinition from an associative array. Required key is id.

Method Details

__construct() public méthode

WidgetDefinition constructor
public __construct ( string $id )
$id string Identifier of the widget

__get() public méthode

Magic getter to return the deprecated attribute 'handler'
public __get ( string $name ) : mixed
$name string attribute to get
Résultat mixed

factory() public static méthode

Create an WidgetDefinition from an associative array. Required key is id.
public static factory ( array $options ) : WidgetDefinition
$options array Option array of key value pairs id => STR Widget identifier (required) name => STR Name of the widget description => STR Description of the widget context => ARRAY contexts in which the widget is available multiple => BOOL can the widget be added multiple times
Résultat WidgetDefinition

Property Details

$context public_oe property

In which contexts is the widget available
public $context

$description public_oe property

Description of the widget
public $description

$id public_oe property

Identifier of the widget
public $id

$multiple public_oe property

Can the widget be added multiple times
public $multiple

$name public_oe property

Readable name of the widget
public $name