PHP Class ElggWidget, Elgg

Stores metadata in private settings rather than as ElggMetadata
Inheritance: extends ElggObject
Mostra file Open project: elgg/elgg Class Usage Examples

Public Methods

Method Description
__get ( string $name ) : mixed Get a value from attributes or private settings
__isset ( string $name ) : boolean Test if property is set either as an attribute or private setting
__set ( string $name, mixed $value ) : void Set an attribute or private setting value
__unset ( string $name ) : void Unset a property from private settings or attribute.
getContext ( ) : string Get the widget context
getTitle ( ) : string Get the title of the widget
move ( integer $column, integer $rank ) : void Move the widget
saveSettings ( array $params ) : boolean Saves the widget's settings
setContext ( string $context ) : boolean Set the widget context

Protected Methods

Method Description
initializeAttributes ( ) : void Set subtype to widget.

Method Details

__get() public method

Get a value from attributes or private settings
public __get ( string $name ) : mixed
$name string The name of the value
return mixed

__isset() public method

Test if property is set either as an attribute or private setting
Since: 2.2.0
public __isset ( string $name ) : boolean
$name string The name of the attribute or private setting.
return boolean

__set() public method

Set an attribute or private setting value
public __set ( string $name, mixed $value ) : void
$name string The name of the value to set
$value mixed The value to set
return void

__unset() public method

Unset a property from private settings or attribute.
Since: 2.2.0
public __unset ( string $name ) : void
$name string The name of the attribute or metadata.
return void

getContext() public method

Get the widget context
Since: 1.8.0
public getContext ( ) : string
return string

getTitle() public method

Get the title of the widget
Since: 1.8.0
public getTitle ( ) : string
return string

initializeAttributes() protected method

Set subtype to widget.
protected initializeAttributes ( ) : void
return void

move() public method

Move the widget
Since: 1.8.0
public move ( integer $column, integer $rank ) : void
$column integer The widget column
$rank integer Zero-based rank from the top of the column
return void

saveSettings() public method

Plugins can override the save mechanism using the plugin hook: 'widget_settings', . The widget and the parameters are passed. The plugin hook handler should return true to indicate that it has successfully saved the settings.
Since: 1.8.0
public saveSettings ( array $params ) : boolean
$params array An array of name => value parameters
return boolean

setContext() public method

Set the widget context
Since: 1.8.0
public setContext ( string $context ) : boolean
$context string The widget context
return boolean