You are here

public function DateRecurDefaultFormatter::viewElements in Recurring Dates Field 8

Overrides DateTimeRangeTrait::viewElements

File

src/Plugin/Field/FieldFormatter/DateRecurDefaultFormatter.php, line 141

Class

DateRecurDefaultFormatter
Plugin implementation of the 'date_recur_default_formatter' formatter.

Namespace

Drupal\date_recur\Plugin\Field\FieldFormatter

Code

public function viewElements(FieldItemListInterface $items, $langcode) {
  $elements = [];
  $this->occurrenceCounter = 0;
  foreach ($items as $delta => $item) {
    $elements[$delta] = $this
      ->viewValue($item);
  }
  return $elements;
}