Elgg  Version 2.3
Public Member Functions | List of all members
Elgg\WidgetsService Class Reference

Public Member Functions

 getWidgets ($owner_guid, $context)
 
 createWidget ($owner_guid, $handler, $context, $access_id=null)
 
 canEditLayout ($context, $user_guid=0)
 
 registerType (WidgetDefinition $definition)
 
 unregisterType ($id)
 
 validateType ($id, $context=null, \ElggEntity $container=null)
 Checks if a widget type exists for a given id. More...
 
 getAllTypes ()
 @access private More...
 
 getNameById ($id, $context='', \ElggEntity $container=null)
 Returns widget name based on id. More...
 
 getTypes (array $params=[])
 

Detailed Description

Definition at line 17 of file WidgetsService.php.

Member Function Documentation

◆ canEditLayout()

Elgg\WidgetsService::canEditLayout (   $context,
  $user_guid = 0 
)
See also
elgg_can_edit_widget_layout @access private
Since
1.9.0

Definition at line 115 of file WidgetsService.php.

◆ createWidget()

Elgg\WidgetsService::createWidget (   $owner_guid,
  $handler,
  $context,
  $access_id = null 
)
See also
elgg_create_widget @access private
Since
1.9.0

Definition at line 77 of file WidgetsService.php.

◆ getAllTypes()

Elgg\WidgetsService::getAllTypes ( )

@access private

Since
1.9.0

Definition at line 205 of file WidgetsService.php.

◆ getNameById()

Elgg\WidgetsService::getNameById (   $id,
  $context = '',
\ElggEntity  $container = null 
)

Returns widget name based on id.

Parameters
string$idWidget identifier
string$contextContext to check
\ElggEntity$containerOptional limit widget definitions to a container
Returns
string|boolean

@access private

Since
2.2.0

Definition at line 221 of file WidgetsService.php.

◆ getTypes()

Elgg\WidgetsService::getTypes ( array  $params = [])
Parameters
$paramsAssociative array of params used to determine what to return

array ( 'context' => string (defaults to elgg_get_context()), 'exact' => bool (defaults to false), 'container' => \ElggEntity (defaults to null) )

Returns
\Elgg\WidgetDefinition[]

@access private

Since
1.9.0

Definition at line 246 of file WidgetsService.php.

◆ getWidgets()

Elgg\WidgetsService::getWidgets (   $owner_guid,
  $context 
)
See also
elgg_get_widgets @access private
Since
1.9.0

Definition at line 35 of file WidgetsService.php.

◆ registerType()

Elgg\WidgetsService::registerType ( WidgetDefinition  $definition)
Parameters
WidgetDefinitionDefinition of the widget
Returns
bool
See also
elgg_register_widget_type @access private
Since
1.9.0

Definition at line 145 of file WidgetsService.php.

◆ unregisterType()

Elgg\WidgetsService::unregisterType (   $id)
Parameters
string$id
Returns
bool
See also
elgg_unregister_widget_type @access private
Since
1.9.0

Definition at line 167 of file WidgetsService.php.

◆ validateType()

Elgg\WidgetsService::validateType (   $id,
  $context = null,
\ElggEntity  $container = null 
)

Checks if a widget type exists for a given id.

Parameters
string$idWidget identifier
string$contextOptional context to check
\ElggEntity$containerOptional limit widget definitions to a container
See also
elgg_is_widget_type @access private
Since
1.9.0

Definition at line 186 of file WidgetsService.php.


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