PHP Класс Elgg\WidgetsService

Use the elgg_* versions instead.
С версии: 1.9.0
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Описание методов

canEditLayout() публичный метод

См. также: elgg_can_edit_widget_layout
С версии: 1.9.0
public canEditLayout ( $context, $user_guid )

createWidget() публичный метод

См. также: elgg_create_widget
С версии: 1.9.0
public createWidget ( $owner_guid, $handler, $context, $access_id = null )

getAllTypes() публичный метод

С версии: 1.9.0
public getAllTypes ( )

getNameById() публичный метод

Returns widget name based on id
С версии: 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
Результат string | boolean

getTypes() публичный метод

С версии: 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) )
Результат WidgetDefinition[]

getWidgets() публичный метод

См. также: elgg_get_widgets
С версии: 1.9.0
public getWidgets ( $owner_guid, $context )

registerType() публичный метод

См. также: elgg_register_widget_type
С версии: 1.9.0
public registerType ( WidgetDefinition $definition ) : boolean
$definition WidgetDefinition
Результат boolean

unregisterType() публичный метод

См. также: elgg_unregister_widget_type
С версии: 1.9.0
public unregisterType ( string $id ) : boolean
$id string
Результат boolean

validateType() публичный метод

Checks if a widget type exists for a given id
См. также: elgg_is_widget_type
С версии: 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