File tree Expand file tree Collapse file tree
Shared/Presentation/Component/Text
Site/Presentation/Component Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ public function getComponentArrayContent(): string
127127/**
128128 * @Flow\Proxy(false)
129129 */
130- final class ' . $ this ->name ->getSimpleComponentArrayName () . ' implements \IteratorAggregate
130+ final class ' . $ this ->name ->getSimpleComponentArrayName () . ' implements \IteratorAggregate, \Countable
131131{
132132 /**
133133 * @var array<int, ' . $ this ->name ->getSimpleInterfaceName () . '>| ' . $ this ->name ->getSimpleInterfaceName () . '[]
@@ -151,6 +151,11 @@ public function getIterator(): \ArrayIterator
151151 {
152152 return new \ArrayIterator($this-> ' . $ this ->name ->getSimpleComponentArrayPropertyName () . ');
153153 }
154+
155+ public function count(): int
156+ {
157+ return count($this-> ' . $ this ->name ->getSimpleComponentArrayPropertyName () . ');
158+ }
154159}
155160 ' ;
156161 }
Original file line number Diff line number Diff line change @@ -419,7 +419,7 @@ public function testGetComponentArrayContent(): void
419419/**
420420 * @Flow\Proxy(false)
421421 */
422- final class MyNewComponents implements \IteratorAggregate
422+ final class MyNewComponents implements \IteratorAggregate, \Countable
423423{
424424 /**
425425 * @var array<int,MyNewComponentInterface>|MyNewComponentInterface[]
@@ -443,6 +443,11 @@ public function getIterator(): \ArrayIterator
443443 {
444444 return new \ArrayIterator($this->myNewComponents);
445445 }
446+
447+ public function count(): int
448+ {
449+ return count($this->myNewComponents);
450+ }
446451}
447452 ' ,
448453 $ this ->subject ->getComponentArrayContent ()
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ use Neos\Flow\Annotations as Flow;
1010/**
1111 * @Flow\Proxy(false)
1212 */
13- final class NewTexts implements \IteratorAggregate
13+ final class NewTexts implements \IteratorAggregate, \Countable
1414{
1515 /**
1616 * @var array<int,NewTextInterface>|NewTextInterface[]
@@ -34,4 +34,9 @@ final class NewTexts implements \IteratorAggregate
3434 {
3535 return new \ArrayIterator($this->newTexts);
3636 }
37+
38+ public function count(): int
39+ {
40+ return count($this->newTexts);
41+ }
3742}
Original file line number Diff line number Diff line change 1111 * A list of texts
1212 * @Flow\Proxy(false)
1313 */
14- final class Texts implements \IteratorAggregate
14+ final class Texts implements \IteratorAggregate, \Countable
1515{
1616 /**
1717 * @var array<int,TextInterface>|TextInterface[]
@@ -36,4 +36,9 @@ public function getIterator(): \ArrayIterator
3636 {
3737 return new \ArrayIterator ($ this ->texts );
3838 }
39+
40+ public function count (): int
41+ {
42+ return count ($ this ->texts );
43+ }
3944}
Original file line number Diff line number Diff line change 1111 * A list of anotherComponents
1212 * @Flow\Proxy(false)
1313 */
14- final class AnotherComponents implements \IteratorAggregate
14+ final class AnotherComponents implements \IteratorAggregate, \Countable
1515{
1616 /**
1717 * @var array<int,AnotherComponentInterface>|AnotherComponentInterface[]
@@ -35,4 +35,9 @@ public function getIterator(): \ArrayIterator
3535 {
3636 return new \ArrayIterator ($ this ->anotherComponents );
3737 }
38+
39+ public function count (): int
40+ {
41+ return count ($ this ->anotherComponents );
42+ }
3843}
Original file line number Diff line number Diff line change 1111 * A list of myComponents
1212 * @Flow\Proxy(false)
1313 */
14- final class MyComponents implements \IteratorAggregate
14+ final class MyComponents implements \IteratorAggregate, \Countable
1515{
1616 /**
1717 * @var array<int,MyComponentInterface>|MyComponentInterface[]
@@ -35,4 +35,9 @@ public function getIterator(): \ArrayIterator
3535 {
3636 return new \ArrayIterator ($ this ->myComponents );
3737 }
38+
39+ public function count (): int
40+ {
41+ return count ($ this ->myComponents );
42+ }
3843}
Original file line number Diff line number Diff line change 1212 * A list of texts
1313 * @Flow\Proxy(false)
1414 */
15- final class Texts implements \IteratorAggregate
15+ final class Texts implements \IteratorAggregate, \Countable
1616{
1717 /**
1818 * @var array<int,TextInterface>|TextInterface[]
@@ -36,4 +36,9 @@ public function getIterator(): \ArrayIterator
3636 {
3737 return new \ArrayIterator ($ this ->texts );
3838 }
39+
40+ public function count (): int
41+ {
42+ return count ($ this ->texts );
43+ }
3944}
You can’t perform that action at this time.
0 commit comments