mirror of
https://github.com/werkraum-media/thuecat.git
synced 2024-06-30 23:38:56 +02:00
Update openingHours model to add count
Needed countable for checking if model contains content. Relates: werkraum-media#18
This commit is contained in:
parent
99b95ee3ed
commit
960d2debec
|
@ -28,7 +28,7 @@ use TYPO3\CMS\Core\Type\TypeInterface;
|
||||||
/**
|
/**
|
||||||
* @implements \Iterator<int, OpeningHour>
|
* @implements \Iterator<int, OpeningHour>
|
||||||
*/
|
*/
|
||||||
class OpeningHours implements TypeInterface, \Iterator
|
class OpeningHours implements TypeInterface, \Iterator, \Countable
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
|
@ -83,4 +83,9 @@ class OpeningHours implements TypeInterface, \Iterator
|
||||||
{
|
{
|
||||||
$this->position = 0;
|
$this->position = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function count()
|
||||||
|
{
|
||||||
|
return count($this->array);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue