CommentNotReplyActivityEntityCondition.php in Open Social 8.4
Same filename and directory in other branches
- 8.9 modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php
- 8 modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php
- 8.2 modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php
- 8.3 modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php
- 8.5 modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php
- 8.6 modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php
- 8.7 modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php
- 8.8 modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php
- 10.3.x modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php
- 10.0.x modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php
- 10.1.x modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php
- 10.2.x modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php
File
modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.phpView source
<?php
namespace Drupal\activity_basics\Plugin\ActivityEntityCondition;
use Drupal\activity_creator\Plugin\ActivityEntityConditionBase;
/**
* Provides a 'CommentNotReply' activity condition.
*
* @ActivityEntityCondition(
* id = "comment_not_reply",
* label = @Translation("Not reply comment"),
* entities = {"comment" = {}}
* )
*/
class CommentNotReplyActivityEntityCondition extends ActivityEntityConditionBase {
/**
* {@inheritdoc}
*/
public function isValidEntityCondition($entity) {
if ($entity
->getEntityTypeId() === 'comment') {
if (empty($entity
->getParentComment())) {
return TRUE;
}
}
return FALSE;
}
}
Classes
Name | Description |
---|---|
CommentNotReplyActivityEntityCondition | Provides a 'CommentNotReply' activity condition. |