PHP Class Elgg\WidgetsService

Use the elgg_* versions instead.
Since: 1.9.0
Afficher le fichier Open project: elgg/elgg Class Usage Examples

Méthodes publiques

Méthode Description
canEditLayout ( $context, $user_guid )
createWidget ( $owner_guid, $handler, $context, $access_id = null )
getAllTypes ( )
getNameById ( string $id, string $context = '', ElggEntity $container = null ) : string | boolean Returns widget name based on id
getTypes ( array $params = [] ) : WidgetDefinition[]
getWidgets ( $owner_guid, $context )
registerType ( WidgetDefinition $definition ) : boolean
unregisterType ( string $id ) : boolean
validateType ( string $id, string $context = null, ElggEntity $container = null ) Checks if a widget type exists for a given id

Method Details

canEditLayout() public méthode

See also: elgg_can_edit_widget_layout
Since: 1.9.0
public canEditLayout ( $context, $user_guid )

createWidget() public méthode

See also: elgg_create_widget
Since: 1.9.0
public createWidget ( $owner_guid, $handler, $context, $access_id = null )

getAllTypes() public méthode

Since: 1.9.0
public getAllTypes ( )

getNameById() public méthode

Returns widget name based on id
Since: 2.2.0
public getNameById ( string $id, string $context = '', ElggEntity $container = null ) : string | boolean
$id string Widget identifier
$context string Context to check
$container ElggEntity Optional limit widget definitions to a container
Résultat string | boolean

getTypes() public méthode

Since: 1.9.0
public getTypes ( array $params = [] ) : WidgetDefinition[]
$params array Associative array of params used to determine what to return array ( 'context' => string (defaults to elgg_get_context()), 'container' => \ElggEntity (defaults to null) )
Résultat WidgetDefinition[]

getWidgets() public méthode

See also: elgg_get_widgets
Since: 1.9.0
public getWidgets ( $owner_guid, $context )

registerType() public méthode

See also: elgg_register_widget_type
Since: 1.9.0
public registerType ( WidgetDefinition $definition ) : boolean
$definition WidgetDefinition
Résultat boolean

unregisterType() public méthode

See also: elgg_unregister_widget_type
Since: 1.9.0
public unregisterType ( string $id ) : boolean
$id string
Résultat boolean

validateType() public méthode

Checks if a widget type exists for a given id
See also: elgg_is_widget_type
Since: 1.9.0
public validateType ( string $id, string $context = null, ElggEntity $container = null )
$id string Widget identifier
$context string Optional context to check
$container ElggEntity Optional limit widget definitions to a container