You are here

public function GroupContentInMyGroupActivityContext::isValidEntity in Open Social 10.1.x

Same name and namespace in other branches
  1. 8.9 modules/custom/activity_basics/src/Plugin/ActivityContext/GroupContentInMyGroupActivityContext.php \Drupal\activity_basics\Plugin\ActivityContext\GroupContentInMyGroupActivityContext::isValidEntity()
  2. 8.4 modules/custom/activity_basics/src/Plugin/ActivityContext/GroupContentInMyGroupActivityContext.php \Drupal\activity_basics\Plugin\ActivityContext\GroupContentInMyGroupActivityContext::isValidEntity()
  3. 8.5 modules/custom/activity_basics/src/Plugin/ActivityContext/GroupContentInMyGroupActivityContext.php \Drupal\activity_basics\Plugin\ActivityContext\GroupContentInMyGroupActivityContext::isValidEntity()
  4. 8.6 modules/custom/activity_basics/src/Plugin/ActivityContext/GroupContentInMyGroupActivityContext.php \Drupal\activity_basics\Plugin\ActivityContext\GroupContentInMyGroupActivityContext::isValidEntity()
  5. 8.7 modules/custom/activity_basics/src/Plugin/ActivityContext/GroupContentInMyGroupActivityContext.php \Drupal\activity_basics\Plugin\ActivityContext\GroupContentInMyGroupActivityContext::isValidEntity()
  6. 8.8 modules/custom/activity_basics/src/Plugin/ActivityContext/GroupContentInMyGroupActivityContext.php \Drupal\activity_basics\Plugin\ActivityContext\GroupContentInMyGroupActivityContext::isValidEntity()
  7. 10.3.x modules/custom/activity_basics/src/Plugin/ActivityContext/GroupContentInMyGroupActivityContext.php \Drupal\activity_basics\Plugin\ActivityContext\GroupContentInMyGroupActivityContext::isValidEntity()
  8. 10.0.x modules/custom/activity_basics/src/Plugin/ActivityContext/GroupContentInMyGroupActivityContext.php \Drupal\activity_basics\Plugin\ActivityContext\GroupContentInMyGroupActivityContext::isValidEntity()
  9. 10.2.x modules/custom/activity_basics/src/Plugin/ActivityContext/GroupContentInMyGroupActivityContext.php \Drupal\activity_basics\Plugin\ActivityContext\GroupContentInMyGroupActivityContext::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/custom/activity_basics/src/Plugin/ActivityContext/GroupContentInMyGroupActivityContext.php, line 127

Class

GroupContentInMyGroupActivityContext
Provides a 'GroupContentInMyGroupActivityContext' activity context.

Namespace

Drupal\activity_basics\Plugin\ActivityContext

Code

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