You are here

public function QueueStorageEntitySendActivityCondition::isValidEntityCondition in Open Social 8.9

Same name and namespace in other branches
  1. 8.8 modules/custom/social_queue_storage/src/Plugin/ActivityEntityCondition/QueueStorageEntitySendActivityCondition.php \Drupal\social_queue_storage\Plugin\ActivityEntityCondition\QueueStorageEntitySendActivityCondition::isValidEntityCondition()
  2. 10.3.x modules/custom/social_queue_storage/src/Plugin/ActivityEntityCondition/QueueStorageEntitySendActivityCondition.php \Drupal\social_queue_storage\Plugin\ActivityEntityCondition\QueueStorageEntitySendActivityCondition::isValidEntityCondition()
  3. 10.0.x modules/custom/social_queue_storage/src/Plugin/ActivityEntityCondition/QueueStorageEntitySendActivityCondition.php \Drupal\social_queue_storage\Plugin\ActivityEntityCondition\QueueStorageEntitySendActivityCondition::isValidEntityCondition()
  4. 10.1.x modules/custom/social_queue_storage/src/Plugin/ActivityEntityCondition/QueueStorageEntitySendActivityCondition.php \Drupal\social_queue_storage\Plugin\ActivityEntityCondition\QueueStorageEntitySendActivityCondition::isValidEntityCondition()
  5. 10.2.x modules/custom/social_queue_storage/src/Plugin/ActivityEntityCondition/QueueStorageEntitySendActivityCondition.php \Drupal\social_queue_storage\Plugin\ActivityEntityCondition\QueueStorageEntitySendActivityCondition::isValidEntityCondition()

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

Overrides ActivityEntityConditionBase::isValidEntityCondition

File

modules/custom/social_queue_storage/src/Plugin/ActivityEntityCondition/QueueStorageEntitySendActivityCondition.php, line 21

Class

QueueStorageEntitySendActivityCondition
Provides a 'QueueStorageEntitySendActivityAction` activity action.

Namespace

Drupal\social_queue_storage\Plugin\ActivityEntityCondition

Code

public function isValidEntityCondition($entity) {

  /** @var \Drupal\social_queue_storage\Entity\QueueStorageEntity $entity */
  if ($entity
    ->getEntityTypeId() === 'queue_storage_entity') {
    return $entity
      ->isFinished();
  }
  return FALSE;
}