Elgg
Version master
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
classes
Elgg
Comments
ContainerLogicHandler.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Elgg\Comments
;
4
10
class
ContainerLogicHandler
{
11
19
public
function
__invoke
(\
Elgg
\
Event
$event) {
20
if
($event->getParam(
'subtype'
) !==
'comment'
) {
21
return
;
22
}
23
24
$container
= $event->getParam(
'container'
);
25
if
(!
$container
instanceof \
ElggEntity
) {
26
return
;
27
}
28
29
if
(!
$container
->hasCapability(
'commentable'
)) {
30
return
false
;
31
}
32
}
33
}
Elgg\Comments\ContainerLogicHandler\__invoke
__invoke(\Elgg\Event $event)
Prevent commenting on a container if container is not commentable.
Definition:
ContainerLogicHandler.php:19
Elgg\Comments
Definition:
AutoSubscribeHandler.php:3
Elgg
Definition:
ActionsService.php:3
$container
$container
Definition:
delete.php:23
ElggEntity
Definition:
ElggEntity.php:52
Elgg\Comments\ContainerLogicHandler
Check commentable capability for a container.
Definition:
ContainerLogicHandler.php:10
Elgg\Event
Models an event passed to event handlers.
Definition:
Event.php:11
Generated on Sat Dec 21 2024 00:02:51 for Elgg by
1.8.11