You are here

public function CommentNotReplyActivityEntityCondition::isValidEntityCondition in Open Social 8.3

Same name and namespace in other branches
  1. 8.9 modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php \Drupal\activity_basics\Plugin\ActivityEntityCondition\CommentNotReplyActivityEntityCondition::isValidEntityCondition()
  2. 8 modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php \Drupal\activity_basics\Plugin\ActivityEntityCondition\CommentNotReplyActivityEntityCondition::isValidEntityCondition()
  3. 8.2 modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php \Drupal\activity_basics\Plugin\ActivityEntityCondition\CommentNotReplyActivityEntityCondition::isValidEntityCondition()
  4. 8.4 modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php \Drupal\activity_basics\Plugin\ActivityEntityCondition\CommentNotReplyActivityEntityCondition::isValidEntityCondition()
  5. 8.5 modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php \Drupal\activity_basics\Plugin\ActivityEntityCondition\CommentNotReplyActivityEntityCondition::isValidEntityCondition()
  6. 8.6 modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php \Drupal\activity_basics\Plugin\ActivityEntityCondition\CommentNotReplyActivityEntityCondition::isValidEntityCondition()
  7. 8.7 modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php \Drupal\activity_basics\Plugin\ActivityEntityCondition\CommentNotReplyActivityEntityCondition::isValidEntityCondition()
  8. 8.8 modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php \Drupal\activity_basics\Plugin\ActivityEntityCondition\CommentNotReplyActivityEntityCondition::isValidEntityCondition()
  9. 10.3.x modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php \Drupal\activity_basics\Plugin\ActivityEntityCondition\CommentNotReplyActivityEntityCondition::isValidEntityCondition()
  10. 10.0.x modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php \Drupal\activity_basics\Plugin\ActivityEntityCondition\CommentNotReplyActivityEntityCondition::isValidEntityCondition()
  11. 10.1.x modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php \Drupal\activity_basics\Plugin\ActivityEntityCondition\CommentNotReplyActivityEntityCondition::isValidEntityCondition()
  12. 10.2.x modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php \Drupal\activity_basics\Plugin\ActivityEntityCondition\CommentNotReplyActivityEntityCondition::isValidEntityCondition()

Checks if this is a valid entity condition for the action.

Overrides ActivityEntityConditionBase::isValidEntityCondition

File

modules/custom/activity_basics/src/Plugin/ActivityEntityCondition/CommentNotReplyActivityEntityCondition.php, line 21

Class

CommentNotReplyActivityEntityCondition
Provides a 'CommentNotReply' activity condition.

Namespace

Drupal\activity_basics\Plugin\ActivityEntityCondition

Code

public function isValidEntityCondition($entity) {
  if ($entity
    ->getEntityTypeId() === 'comment') {
    if (empty($entity
      ->getParentComment())) {
      return TRUE;
    }
  }
  return FALSE;
}