ActionGroup now implements Countable interface.
This commit is contained in:
+10
-1
@@ -6,7 +6,7 @@ namespace LotGD\Core;
|
||||
/**
|
||||
* A grouping of navigation actions, like a submenu.
|
||||
*/
|
||||
class ActionGroup
|
||||
class ActionGroup implements \Countable
|
||||
{
|
||||
const DefaultGroup = 'lotgd/core/default';
|
||||
const HiddenGroup = 'lotgd/core/hidden';
|
||||
@@ -30,6 +30,15 @@ class ActionGroup
|
||||
$this->actions = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of registered Actions for this group.
|
||||
* @return int
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return count($this->actions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the unique identifier for this group, in the vendor/module/group format.
|
||||
* @return string
|
||||
|
||||
@@ -4,6 +4,7 @@ declare (strict_types=1);
|
||||
namespace LotGD\Core;
|
||||
|
||||
use DateTime;
|
||||
use Doctrine\Common\Util\Debug;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use LotGD\Core\Events\NavigateToSceneData;
|
||||
use LotGD\Core\Events\NewViewpointData;
|
||||
|
||||
Reference in New Issue
Block a user