public function DateRecurCachedHooks::fieldInfoAlter in Recurring Dates Field 3.x
Same name and namespace in other branches
- 8.2 src/DateRecurCachedHooks.php \Drupal\date_recur\DateRecurCachedHooks::fieldInfoAlter()
- 3.0.x src/DateRecurCachedHooks.php \Drupal\date_recur\DateRecurCachedHooks::fieldInfoAlter()
- 3.1.x src/DateRecurCachedHooks.php \Drupal\date_recur\DateRecurCachedHooks::fieldInfoAlter()
Implements hook_field_info_alter().
See also
\date_recur_field_info_alter()
File
- src/
DateRecurCachedHooks.php, line 22
Class
- DateRecurCachedHooks
- Defines hooks that run when caches need to be rebuilt.
Namespace
Drupal\date_recurCode
public function fieldInfoAlter(array &$info) : void {
foreach ($info as &$definition) {
$class = $definition['class'];
// Is date_recur or a subclass.
if ($class == DateRecurItem::class || (new \ReflectionClass($class))
->isSubclassOf(DateRecurItem::class)) {
$definition[DateRecurOccurrences::IS_DATE_RECUR] = 'TRUE';
}
}
}