Elgg
Version 4.3
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
classes
Elgg
Groups
ToolContainerLogicCheck.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Elgg\Groups
;
4
10
abstract
class
ToolContainerLogicCheck
{
11
19
public
function
__invoke
(\
Elgg
\
Hook
$hook) {
20
21
if
($hook->getType() !== $this->
getContentType
()) {
22
// not the correct hook registration
23
return
;
24
}
25
26
$container
= $hook->getParam(
'container'
);
27
if
(!
$container
instanceof \
ElggGroup
) {
28
return
;
29
}
30
31
if
($hook->getParam(
'subtype'
) !== $this->
getContentSubtype
()) {
32
return
;
33
}
34
35
if
(
$container
->isToolEnabled($this->getToolName())) {
36
return
;
37
}
38
39
return
false
;
40
}
41
47
abstract
public
function
getContentType
(): string;
48
54
abstract
public
function
getContentSubtype
(): string;
55
61
abstract
public
function
getToolName
(): string;
62
}
Elgg\Groups\ToolContainerLogicCheck\getContentSubtype
getContentSubtype()
Returns the subtype affected by the group tool option.
Elgg\Groups\ToolContainerLogicCheck
Check if content can be created in a group based on the group tool option.
Definition:
ToolContainerLogicCheck.php:10
Elgg\Hook
Models an event passed to hook handlers.
Definition:
Hook.php:11
ElggGroup
Elgg
Definition:
ActionsService.php:3
Elgg\Groups\ToolContainerLogicCheck\getToolName
getToolName()
Returns the name of the group tool option to check if is enabled.
Elgg\Groups\ToolContainerLogicCheck\getContentType
getContentType()
Returns the type of the content affected by the group tool option.
Elgg\Groups\ToolContainerLogicCheck\__invoke
__invoke(\Elgg\Hook $hook)
Listen to the container logic check hook.
Definition:
ToolContainerLogicCheck.php:19
$container
$container
Definition:
delete.php:23
Elgg\Groups
Definition:
MemberPermissionsHandler.php:3
Generated on Sat Feb 4 2023 00:00:22 for Elgg by
1.8.11