Elgg  Version master
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...
 

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 13 of file WidgetDefinition.php.

Constructor & Destructor Documentation

Elgg\WidgetDefinition::__construct (   $id)

WidgetDefinition constructor.

Parameters
string$idIdentifier of the widget
Exceptions
InvalidArgumentException

Definition at line 52 of file WidgetDefinition.php.

Member Function Documentation

Elgg\WidgetDefinition::checkRequiredActivePlugins ( )
protected

Checks if the required plugins are active.

If none set this function will return true.

Returns
boolean

Definition at line 123 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
Returns

Definition at line 72 of file WidgetDefinition.php.

Elgg\WidgetDefinition::isValid ( )

Checks if the widget definition meets all requirements.

Returns
boolean

Definition at line 114 of file WidgetDefinition.php.

Member Data Documentation

Elgg\WidgetDefinition::$context

Definition at line 33 of file WidgetDefinition.php.

Elgg\WidgetDefinition::$description

Definition at line 28 of file WidgetDefinition.php.

Elgg\WidgetDefinition::$id

Definition at line 18 of file WidgetDefinition.php.

Elgg\WidgetDefinition::$multiple

Definition at line 38 of file WidgetDefinition.php.

Elgg\WidgetDefinition::$name

Definition at line 23 of file WidgetDefinition.php.

Elgg\WidgetDefinition::$required_plugin

Definition at line 43 of file WidgetDefinition.php.


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