Activate the item.

@param Item $item
@param bool $recursion
760986
public function activate(Item $item = null, $recursion = false)
    {
        $item = is_null($item) ? $this : $item;

        // Check to see which element should have class 'active' set.
        if ('item' == $this->builder->conf('active_element')) {
            $item->active();
        } else {
            $item->link->active();
        }

        if (false === $recursion) {
            $item->active = true;
        }

        // If parent activation is enabled:
        if (true === $this->builder->conf('activate_parents')) {
            // Moving up through the parent nodes, activating them as well.
            if ($item->parent) {
                $this->activate($this->builder->whereId($item->parent)->first(), true);
            }
        }
    }
988088
public function add_item( $item ) {
		if ( is_array( $item ) ) {
			foreach ( $item as $single_item ) {
				$this->add_item( $single_item );
			}
		} else {
			$priority                   = $item->get_priority();
			$this->items[ $priority ][] = $item;
		}
	}
1212553
protected function setFound($item, $item2)
    {
        if (isset($this->missing[$item])) {
            unset($this->missing[$item][$item2]);
            if (empty($this->missing[$item])) {
                unset($this->missing[$item]);
            }
        }
    }
734576
protected function onBeforeInsert($item)
    {
        $this->flushFieldsCache();

        if ($item->getName()) {
            $this->rootFieldList()->removeByName($item->getName(), true);
        }
    }
814293
private function initLoader($item, $key, ...$initLoaderArgs): void
    {
        $this->eventDispatcher->dispatch(new ItemEvent(EtlEvents::LOADER_INIT, $item, $key, $this));

        if (null === $this->init) {
            return;
        }

        ($this->init)(...$initLoaderArgs);
    }
256469
public function addItem(Item $item)
    {
        if (!$this->items->contains($item)) {
            $this->items->add($item);
            $item->setStorage($this);
        }

        return $this;
    }
1230746
public function addItem($name, \SlimStarter\Menu\MenuItem $item){
        $this->items[$name] = $item;
    }
957420
public function setItem($item)
    {
        $this->items[] = $item->expose();

        $this->totalWishlistValue += $item->getTotalValueOfProduct();
    }
1033913
function(item, reroot) {
			return this.showItem(item, reroot).then(function(result) {
				this.select(result);
			}.bind(this));
		}
1199085
public function setItem(Item $item)
    {
        if ($this->item !== $item) {
            $this->item = $item->addGenre($this);
        }

        return $this;
    }
1302268
public function add($item)
    {
        if ($item instanceof ItemInterface) {
            $this->items[] = $item;
        } else {
            $this->items[] = new MulticardsItem($item);
        }
    }
709685
public function addItem(Item $item) {
        if(empty($item->title) && empty($item->description)) {
            throw new Exception('At least one of title or description must be defined.');
        }

        $this->items[] = $item;
    }
608264
private function immediateNotification(&$group, &$item)
    {
        $item->complete();

        $immediateNotification = false;

        if (is_object($group) === true) {
            if (intval($group->group_notifications) === 0) {
                $immediateNotification = true;
            }
        } else {
            $immediateNotification = true;
        }
        if ($immediateNotification === true) {
            $this->trigger(
                self::EVENT_DEFERRED_QUEUE_COMPLETE,
                new DeferredQueueCompleteEvent($item)
            );
        }
    }
44611
protected function setActive(ItemInterface $item = null)
    {
        if ($item) {
            $this->setActive($item->getParent());
            $item->setAttribute('class', $item->getAttribute('class', '') . ' active');
        }
    }
1091217
public function hasItem(Item $item, bool $initialOnly = true): bool
    {
        $list = ($initialOnly) ? $this->initialItems : $this->items;
        foreach ($list as $my_item) {
            if (0 === Item::compare($my_item, $item)) {
                return true;
            }
        }
        return false;
    }
265980
public function removeItem($item)
    {
        $key = $this->getKey($item);
        if ($key !== false) {
            $this->offsetUnset($key);
        }
    }
1058917
public void add(Item item)
    {
        Item innerItem = trie.get(item.key);
        if (innerItem == null)
        {
            innerItem = item;
            trie.put(innerItem.key, innerItem);
        }
        else
        {
            innerItem.combine(item);
        }
    }