for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Silverback\ApiComponentBundle\Factory\Entity\Component\Navigation\Menu;
use Silverback\ApiComponentBundle\Entity\Component\Navigation\Menu\MenuItem;
use Silverback\ApiComponentBundle\Factory\Entity\Component\Navigation\AbstractNavigationItemFactory;
/**
* @author Daniel West <[email protected]>
*/
final class MenuItemFactory extends AbstractNavigationItemFactory
{
* @inheritdoc
public function create(?array $ops = null): MenuItem
$component = new MenuItem();
$this->init($component, $ops);
$component->setMenuLabel($this->ops['menuLabel']);
$this->validate($component);
return $component;
}
public static function defaultOps(): array
return array_merge(
parent::defaultOps(),
[
'menuLabel' => false
]
);