/** * 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; }
/** * Add menu entry. * {@inheritdoc} */ public function add(ItemInterface $item) { $this->items[$item->getId()] = $item; return $this; }