mirror of
https://github.com/werkraum-media/thuecat.git
synced 2024-12-05 03:26:13 +01: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
1 changed files with 6 additions and 1 deletions
|
@ -28,7 +28,7 @@ use TYPO3\CMS\Core\Type\TypeInterface;
|
|||
/**
|
||||
* @implements \Iterator<int, OpeningHour>
|
||||
*/
|
||||
class OpeningHours implements TypeInterface, \Iterator
|
||||
class OpeningHours implements TypeInterface, \Iterator, \Countable
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
|
@ -83,4 +83,9 @@ class OpeningHours implements TypeInterface, \Iterator
|
|||
{
|
||||
$this->position = 0;
|
||||
}
|
||||
|
||||
public function count()
|
||||
{
|
||||
return count($this->array);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue