예제 #1
0
 /**
  * Class constructor
  *
  * @param string $name      The name of this menu, which is how its parent will
  *                          reference it. Also used as label if label not specified
  * @param \Knp\Menu\FactoryInterface $factory
  *
  * @param Menu $menu
  */
 public function __construct($name, FactoryInterface $factory = null, Menu $menu = null)
 {
     if ($factory === null) {
         $factory = new \Knp\Menu\MenuFactory();
     }
     parent::__construct($name, $factory);
     $this->menu = $menu;
     $this->children = new ArrayCollection();
 }
예제 #2
0
 /**
  * Constructor
  */
 public function __construct($name, FactoryInterface $factory)
 {
     $this->children = new ArrayCollection();
     $this->data = array('attributes' => array(), 'linkAttributes' => array(), 'childrenAttributes' => array(), 'labelAttributes' => array(), 'extras' => array());
     parent::__construct($name, $factory);
 }