Elgg
Version master
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
\
Event
$event) {
20
21
if
($event->getType() !== $this->
getContentType
()) {
22
// not the correct event registration
23
return
;
24
}
25
26
$container
= $event->getParam(
'container'
);
27
if
(!
$container
instanceof \
ElggGroup
) {
28
return
;
29
}
30
31
if
($event->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\Groups\ToolContainerLogicCheck\__invoke
__invoke(\Elgg\Event $event)
Listen to the container logic check event.
Definition:
ToolContainerLogicCheck.php:19
Elgg
Definition:
ActionsService.php:3
Elgg\Groups\ToolContainerLogicCheck\getToolName
getToolName()
Returns the name of the group tool option to check if is enabled.
ElggGroup
Definition:
ElggGroup.php:14
Elgg\Groups\ToolContainerLogicCheck\getContentType
getContentType()
Returns the type of the content affected by the group tool option.
$container
$container
Definition:
delete.php:23
Elgg\Event
Models an event passed to event handlers.
Definition:
Event.php:11
Elgg\Groups
Definition:
MemberPermissionsHandler.php:3
Generated on Mon Dec 2 2024 00:03:24 for Elgg by
1.8.11