Elgg  Version 3.0
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Elgg\WidgetDefinition Class Reference

WidgetDefinition. More...

Public Member Functions

 __construct ($id)
 WidgetDefinition constructor. More...
 
 isValid ()
 Checks if the widget definition meets all requirements. More...
 
 __get ($name)
 Magic getter to return the deprecated attribute 'handler'. More...
 

Static Public Member Functions

static factory (array $options)
 Create an WidgetDefinition from an associative array. More...
 

Public Attributes

 $id
 
 $name
 
 $description
 
 $context
 
 $multiple
 
 $required_plugin
 

Protected Member Functions

 checkRequiredActivePlugins ()
 Checks if the required plugins are active. More...
 

Detailed Description

WidgetDefinition.

Helper class for defining a widget

Definition at line 10 of file WidgetDefinition.php.

Constructor & Destructor Documentation

Elgg\WidgetDefinition::__construct (   $id)

WidgetDefinition constructor.

Parameters
string$idIdentifier of the widget

Definition at line 47 of file WidgetDefinition.php.

Member Function Documentation

Elgg\WidgetDefinition::__get (   $name)

Magic getter to return the deprecated attribute 'handler'.

Parameters
string$nameattribute to get
Returns
mixed

Definition at line 151 of file WidgetDefinition.php.

Elgg\WidgetDefinition::checkRequiredActivePlugins ( )
protected

Checks if the required plugins are active.

If none set this function will return true.

Returns
boolean

Definition at line 130 of file WidgetDefinition.php.

static Elgg\WidgetDefinition::factory ( array  $options)
static

Create an WidgetDefinition from an associative array.

Required key is id.

Parameters
array$optionsOption 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

Exceptions

Definition at line 69 of file WidgetDefinition.php.

Elgg\WidgetDefinition::isValid ( )

Checks if the widget definition meets all requirements.

Returns
boolean

Definition at line 121 of file WidgetDefinition.php.

Member Data Documentation

Elgg\WidgetDefinition::$context

Definition at line 30 of file WidgetDefinition.php.

Elgg\WidgetDefinition::$description

Definition at line 25 of file WidgetDefinition.php.

Elgg\WidgetDefinition::$id

Definition at line 15 of file WidgetDefinition.php.

Elgg\WidgetDefinition::$multiple

Definition at line 35 of file WidgetDefinition.php.

Elgg\WidgetDefinition::$name

Definition at line 20 of file WidgetDefinition.php.

Elgg\WidgetDefinition::$required_plugin

Definition at line 40 of file WidgetDefinition.php.


The documentation for this class was generated from the following file: