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

Group tools service. More...

Public Member Functions

 __construct (EventsService $events)
 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
 
 $events
 

Detailed Description

Group tools service.

NOTE: This is part of the public Elgg Service DI

Definition at line 13 of file Tools.php.

Constructor & Destructor Documentation

Elgg\Groups\Tools::__construct ( EventsService  $events)

Constructor.

Parameters
EventsService$eventsEvents

Definition at line 30 of file Tools.php.

Member Function Documentation

Elgg\Groups\Tools::all ( )

Returns registered tools.

Returns
Collection|Tool[]

Definition at line 80 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 71 of file Tools.php.

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

Returns group specific tools.

Parameters
\ElggGroup$groupGroup
Returns
Collection|Tool[]

Definition at line 93 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 48 of file Tools.php.

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

Removes a group tool.

Parameters
string$nameTool name
Returns
void

Definition at line 61 of file Tools.php.

Member Data Documentation

Elgg\Groups\Tools::$events
protected

Definition at line 23 of file Tools.php.

Elgg\Groups\Tools::$tools
protected

Definition at line 18 of file Tools.php.


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