private function SmartDateRecurrenceFormatter::augmentOutput in Smart Date 3.4.x
Apply any configured augmenters.
Parameters
array $output: Render array of output.
array $augmenters: The augmenters that have been configured.
int $start_ts: The start of the date range.
int $end_ts: The end of the date range.
string $timezone: The timezone to use.
int $delta: The field delta being formatted.
string $repeats: An optional RRULE string containing recurrence details.
string $ends: An optional string to specify the end of the last instance.
string $type: The set of configuration to use.
1 call to SmartDateRecurrenceFormatter::augmentOutput()
- SmartDateRecurrenceFormatter::viewElements in modules/
smart_date_recur/ src/ Plugin/ Field/ FieldFormatter/ SmartDateRecurrenceFormatter.php
File
- modules/
smart_date_recur/ src/ Plugin/ Field/ FieldFormatter/ SmartDateRecurrenceFormatter.php, line 399
Class
- SmartDateRecurrenceFormatter
- Plugin for a recurrence-optimized formatter for 'smartdate' fields.
Namespace
Drupal\smart_date_recur\Plugin\Field\FieldFormatterCode
private function augmentOutput(array &$output, array $augmenters, $start_ts, $end_ts, $timezone, $delta, $repeats = '', $ends = '', $type = 'instances') {
if (!$augmenters) {
return;
}
foreach ($augmenters as $augmenter_id => $augmenter) {
$augmenter
->augmentOutput($output, DrupalDateTime::createFromTimestamp($start_ts), DrupalDateTime::createFromTimestamp($end_ts), [
'timezone' => $timezone,
'allday' => static::isAllDay($start_ts, $end_ts, $timezone),
'entity' => $this->entity,
'settings' => $this->sharedSettings[$type]['settings'][$augmenter_id] ?? [],
'delta' => $delta,
'formatter' => $this,
'repeats' => $repeats,
'ends' => empty($ends) ? $ends : DrupalDateTime::createFromTimestamp($ends),
'field_name' => $this->fieldDefinition
->getName(),
]);
}
}