You are here

public function PrivateMessageActivityContext::isValidEntity in Open Social 8.2

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

Check if it's valid.

Overrides ActivityContextBase::isValidEntity

File

modules/social_features/social_private_message/src/Plugin/ActivityContext/PrivateMessageActivityContext.php, line 66

Class

PrivateMessageActivityContext
Provides a 'PrivateMessageActivityContext' activity context.

Namespace

Drupal\social_private_message\Plugin\ActivityContext

Code

public function isValidEntity($entity) {
  if ($entity
    ->getEntityTypeId() === 'private_message') {
    return TRUE;
  }
  return FALSE;
}