Exemplo n.º 1
0
 /**
  * Adds term to a Vocabulary collection.
  * {@inheritdoc}
  */
 public function add(ItemInterface $item)
 {
     if ($this->has($item->getId())) {
         // return if already exists
         return $this;
     }
     $this->items[$item->getId()] = $item;
     return $this;
 }
Exemplo n.º 2
0
 /**
  * Add menu entry.
  * {@inheritdoc}
  */
 public function add(ItemInterface $item)
 {
     $this->items[$item->getId()] = $item;
     return $this;
 }