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

Group tools service. More...

Public Member Functions

 __construct (protected 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
 

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

Constructor.

Parameters
EventsService$eventsEvents

Definition at line 25 of file Tools.php.

Member Function Documentation

Elgg\Groups\Tools::all ( )

Returns registered tools.

Returns
Collection|Tool[]

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

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

Returns group specific tools.

Parameters
\ElggGroup$groupGroup
Returns
Collection|Tool[]

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

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

Removes a group tool.

Parameters
string$nameTool name
Returns
void

Definition at line 55 of file Tools.php.

Member Data Documentation

Elgg\Groups\Tools::$tools
protected

Definition at line 18 of file Tools.php.


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