public function SmartDateRule::getRuleOverrides in Smart Date 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::getRuleOverrides()
- 3.0.x modules/smart_date_recur/src/Entity/SmartDateRule.php \Drupal\smart_date_recur\Entity\SmartDateRule::getRuleOverrides()
- 3.1.x modules/smart_date_recur/src/Entity/SmartDateRule.php \Drupal\smart_date_recur\Entity\SmartDateRule::getRuleOverrides()
- 3.2.x modules/smart_date_recur/src/Entity/SmartDateRule.php \Drupal\smart_date_recur\Entity\SmartDateRule::getRuleOverrides()
- 3.3.x modules/smart_date_recur/src/Entity/SmartDateRule.php \Drupal\smart_date_recur\Entity\SmartDateRule::getRuleOverrides()
- 3.4.x modules/smart_date_recur/src/Entity/SmartDateRule.php \Drupal\smart_date_recur\Entity\SmartDateRule::getRuleOverrides()
Retrieve all overrides created for this rule.
1 call to SmartDateRule::getRuleOverrides()
- SmartDateRule::getRuleInstances in modules/
smart_date_recur/ src/ Entity/ SmartDateRule.php - Provide a formatted array of instances, with any overrides applied.
File
- modules/
smart_date_recur/ src/ Entity/ SmartDateRule.php, line 140
Class
- SmartDateRule
- Defines the Smart date rule entity.
Namespace
Drupal\smart_date_recur\EntityCode
public function getRuleOverrides() {
$result = \Drupal::entityQuery('smart_date_override')
->condition('rrule', $this
->id())
->execute();
$overrides = [];
if ($result && ($overrides_return = SmartDateOverride::loadMultiple($result))) {
foreach ($overrides_return as $override) {
$index = $override->rrule_index
->getString();
$overrides[$index] = $override;
}
}
return $overrides;
}