public function MentionPostActivityEntityCondition::isValidEntityCondition in Open Social 10.3.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_mentions/src/Plugin/ActivityEntityCondition/MentionPostActivityEntityCondition.php \Drupal\social_mentions\Plugin\ActivityEntityCondition\MentionPostActivityEntityCondition::isValidEntityCondition()
- 8 modules/social_features/social_mentions/src/Plugin/ActivityEntityCondition/MentionPostActivityEntityCondition.php \Drupal\social_mentions\Plugin\ActivityEntityCondition\MentionPostActivityEntityCondition::isValidEntityCondition()
- 8.2 modules/social_features/social_mentions/src/Plugin/ActivityEntityCondition/MentionPostActivityEntityCondition.php \Drupal\social_mentions\Plugin\ActivityEntityCondition\MentionPostActivityEntityCondition::isValidEntityCondition()
- 8.3 modules/social_features/social_mentions/src/Plugin/ActivityEntityCondition/MentionPostActivityEntityCondition.php \Drupal\social_mentions\Plugin\ActivityEntityCondition\MentionPostActivityEntityCondition::isValidEntityCondition()
- 8.4 modules/social_features/social_mentions/src/Plugin/ActivityEntityCondition/MentionPostActivityEntityCondition.php \Drupal\social_mentions\Plugin\ActivityEntityCondition\MentionPostActivityEntityCondition::isValidEntityCondition()
- 8.5 modules/social_features/social_mentions/src/Plugin/ActivityEntityCondition/MentionPostActivityEntityCondition.php \Drupal\social_mentions\Plugin\ActivityEntityCondition\MentionPostActivityEntityCondition::isValidEntityCondition()
- 8.6 modules/social_features/social_mentions/src/Plugin/ActivityEntityCondition/MentionPostActivityEntityCondition.php \Drupal\social_mentions\Plugin\ActivityEntityCondition\MentionPostActivityEntityCondition::isValidEntityCondition()
- 8.7 modules/social_features/social_mentions/src/Plugin/ActivityEntityCondition/MentionPostActivityEntityCondition.php \Drupal\social_mentions\Plugin\ActivityEntityCondition\MentionPostActivityEntityCondition::isValidEntityCondition()
- 8.8 modules/social_features/social_mentions/src/Plugin/ActivityEntityCondition/MentionPostActivityEntityCondition.php \Drupal\social_mentions\Plugin\ActivityEntityCondition\MentionPostActivityEntityCondition::isValidEntityCondition()
- 10.0.x modules/social_features/social_mentions/src/Plugin/ActivityEntityCondition/MentionPostActivityEntityCondition.php \Drupal\social_mentions\Plugin\ActivityEntityCondition\MentionPostActivityEntityCondition::isValidEntityCondition()
- 10.1.x modules/social_features/social_mentions/src/Plugin/ActivityEntityCondition/MentionPostActivityEntityCondition.php \Drupal\social_mentions\Plugin\ActivityEntityCondition\MentionPostActivityEntityCondition::isValidEntityCondition()
- 10.2.x modules/social_features/social_mentions/src/Plugin/ActivityEntityCondition/MentionPostActivityEntityCondition.php \Drupal\social_mentions\Plugin\ActivityEntityCondition\MentionPostActivityEntityCondition::isValidEntityCondition()
Checks if this is a valid entity condition for the action.
Overrides ActivityEntityConditionBase::isValidEntityCondition
File
- modules/
social_features/ social_mentions/ src/ Plugin/ ActivityEntityCondition/ MentionPostActivityEntityCondition.php, line 21
Class
- MentionPostActivityEntityCondition
- Provides a 'MentionPost' activity condition.
Namespace
Drupal\social_mentions\Plugin\ActivityEntityConditionCode
public function isValidEntityCondition($entity) {
if ($entity
->getEntityTypeId() === 'mentions') {
if (isset($entity->entity_type) && $entity->entity_type->value == 'post') {
return TRUE;
}
}
return FALSE;
}