You are here

public function VoteActivityContext::isValidEntity in Open Social 8.9

Same name and namespace in other branches
  1. 8 modules/social_features/social_like/src/Plugin/ActivityContext/VoteActivityContext.php \Drupal\social_like\Plugin\ActivityContext\VoteActivityContext::isValidEntity()
  2. 8.2 modules/social_features/social_like/src/Plugin/ActivityContext/VoteActivityContext.php \Drupal\social_like\Plugin\ActivityContext\VoteActivityContext::isValidEntity()
  3. 8.3 modules/social_features/social_like/src/Plugin/ActivityContext/VoteActivityContext.php \Drupal\social_like\Plugin\ActivityContext\VoteActivityContext::isValidEntity()
  4. 8.4 modules/social_features/social_like/src/Plugin/ActivityContext/VoteActivityContext.php \Drupal\social_like\Plugin\ActivityContext\VoteActivityContext::isValidEntity()
  5. 8.5 modules/social_features/social_like/src/Plugin/ActivityContext/VoteActivityContext.php \Drupal\social_like\Plugin\ActivityContext\VoteActivityContext::isValidEntity()
  6. 8.6 modules/social_features/social_like/src/Plugin/ActivityContext/VoteActivityContext.php \Drupal\social_like\Plugin\ActivityContext\VoteActivityContext::isValidEntity()
  7. 8.7 modules/social_features/social_like/src/Plugin/ActivityContext/VoteActivityContext.php \Drupal\social_like\Plugin\ActivityContext\VoteActivityContext::isValidEntity()
  8. 8.8 modules/social_features/social_like/src/Plugin/ActivityContext/VoteActivityContext.php \Drupal\social_like\Plugin\ActivityContext\VoteActivityContext::isValidEntity()
  9. 10.3.x modules/social_features/social_like/src/Plugin/ActivityContext/VoteActivityContext.php \Drupal\social_like\Plugin\ActivityContext\VoteActivityContext::isValidEntity()
  10. 10.0.x modules/social_features/social_like/src/Plugin/ActivityContext/VoteActivityContext.php \Drupal\social_like\Plugin\ActivityContext\VoteActivityContext::isValidEntity()
  11. 10.1.x modules/social_features/social_like/src/Plugin/ActivityContext/VoteActivityContext.php \Drupal\social_like\Plugin\ActivityContext\VoteActivityContext::isValidEntity()
  12. 10.2.x modules/social_features/social_like/src/Plugin/ActivityContext/VoteActivityContext.php \Drupal\social_like\Plugin\ActivityContext\VoteActivityContext::isValidEntity()

Determines if the entity is valid for this context.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity object.

Return value

bool TRUE if it's valid entity.

Overrides ActivityContextBase::isValidEntity

File

modules/social_features/social_like/src/Plugin/ActivityContext/VoteActivityContext.php, line 58

Class

VoteActivityContext
Provides a 'VoteActivityContext' activity context.

Namespace

Drupal\social_like\Plugin\ActivityContext

Code

public function isValidEntity(EntityInterface $entity) {
  return $entity
    ->getEntityTypeId() === 'vote';
}