25 lines
467 B
PHP
25 lines
467 B
PHP
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace Drupal\opd_presentations\Collection;
|
||
|
|
||
|
use Drupal\paragraphs\ParagraphInterface;
|
||
|
|
||
|
/**
|
||
|
* @implements \IteratorAggregate<ParagraphInterface>
|
||
|
*/
|
||
|
readonly final class EventCollection implements \IteratorAggregate {
|
||
|
|
||
|
/**
|
||
|
* @param ParagraphInterface[] $events
|
||
|
*/
|
||
|
public function __construct(private array $events) {
|
||
|
}
|
||
|
|
||
|
public function getIterator(): \Traversable {
|
||
|
return new \ArrayIterator($this->events);
|
||
|
}
|
||
|
|
||
|
}
|