Elgg  Version 3.0
Public Member Functions | Protected Attributes | List of all members
Elgg\Groups\Tools Class Reference

Group tools service. More...

Public Member Functions

 __construct (PluginHooksService $hooks)
 Constructor. More...
 
 register ($name, array $options=[])
 Adds a group tool option. More...
 
 unregister ($name)
 Removes a group tool. More...
 
 get ($name)
 Get a registered tool by its name. More...
 
 all ()
 Returns registered tools. More...
 
 group (ElggGroup $group)
 Returns group specific tools. More...
 

Protected Attributes

 $tools
 
 $hooks
 

Detailed Description

Group tools service.

NOTE: This is part of the public Elgg Service DI

Definition at line 14 of file Tools.php.

Constructor & Destructor Documentation

Elgg\Groups\Tools::__construct ( PluginHooksService  $hooks)

Constructor.

Parameters
PluginHooksService$hooksHooks

Definition at line 31 of file Tools.php.

Member Function Documentation

Elgg\Groups\Tools::all ( )

Returns registered tools.

Returns
Collection|Tool[]

Definition at line 81 of file Tools.php.

Elgg\Groups\Tools::get (   $name)

Get a registered tool by its name.

Parameters
string$nameTool name
Returns
Tool|null

Definition at line 72 of file Tools.php.

Elgg\Groups\Tools::group ( ElggGroup  $group)

Returns group specific tools.

Parameters
ElggGroup$groupGroup
Returns
Collection|Tool[]

Definition at line 94 of file Tools.php.

Elgg\Groups\Tools::register (   $name,
array  $options = [] 
)

Adds a group tool option.

Parameters
string$nameTool ID
array$optionsTool config options

string $label Label to appear on the group edit form string $title Tool name bool $default_on Is the tool enabled by default? int $priority Module priority

Returns
void

Definition at line 49 of file Tools.php.

Elgg\Groups\Tools::unregister (   $name)

Removes a group tool.

Parameters
string$nameTool name
Returns
void

Definition at line 62 of file Tools.php.

Member Data Documentation

Elgg\Groups\Tools::$hooks
protected

Definition at line 24 of file Tools.php.

Elgg\Groups\Tools::$tools
protected

Definition at line 19 of file Tools.php.


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