public static function SmartDateRule::postDelete in Smart Date 3.3.x
Same name and namespace in other branches
- 8.2 modules/smart_date_recur/src/Entity/SmartDateRule.php \Drupal\smart_date_recur\Entity\SmartDateRule::postDelete()
- 3.x modules/smart_date_recur/src/Entity/SmartDateRule.php \Drupal\smart_date_recur\Entity\SmartDateRule::postDelete()
- 3.0.x modules/smart_date_recur/src/Entity/SmartDateRule.php \Drupal\smart_date_recur\Entity\SmartDateRule::postDelete()
- 3.1.x modules/smart_date_recur/src/Entity/SmartDateRule.php \Drupal\smart_date_recur\Entity\SmartDateRule::postDelete()
- 3.2.x modules/smart_date_recur/src/Entity/SmartDateRule.php \Drupal\smart_date_recur\Entity\SmartDateRule::postDelete()
- 3.4.x modules/smart_date_recur/src/Entity/SmartDateRule.php \Drupal\smart_date_recur\Entity\SmartDateRule::postDelete()
Acts on deleted entities before the delete hook is invoked.
Used after the entities are deleted but before invoking the delete hook.
Parameters
\Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object.
\Drupal\Core\Entity\EntityInterface[] $entities: An array of entities.
Overrides EntityBase::postDelete
File
- modules/
smart_date_recur/ src/ Entity/ SmartDateRule.php, line 757
Class
- SmartDateRule
- Defines the Smart date rule entity.
Namespace
Drupal\smart_date_recur\EntityCode
public static function postDelete(EntityStorageInterface $storage, array $entities) {
parent::postDelete($storage, $entities);
foreach ($entities as $id => $rrule) {
// Delete any child overrides when a rule is deleted.
$overrides = $rrule
->getRuleOverrides();
foreach ($overrides as $override) {
$override
->delete();
}
}
}