Inserts an item between two nodes

@param mixed  $item The item
@param Bucket $prev The previous bucket
@param Bucket $next The next bucket

@return void
340235
protected function insertBetween($item, Bucket $prev, Bucket $next): void
    {
        $bucket = new ItemBucket($item);

        $prev->setNext($bucket);
        $next->setPrev($bucket);

        $bucket->setPrev($prev);
        $bucket->setNext($next);

        $this->current = $bucket;
        $this->count++;
    }
1352921
public function setItem(Item $item = null)
    {
        if ($this->item !== $item) {
            // romove link on this item for old item
            if ($this->item instanceof Item) {
                $tmp = $this->item;
                $this->item = null;
                $tmp->removeName($this);
            }
            $this->item = $item;
            // add link on this item
            if ($item instanceof Item) {
                $this->item->addName($this);
            }
        }

        return $this;
    }
1170352
public function addItem(OrderingItem $item)
    {
        if (!$this->items->contains($item)) {
            $item->setQuestion($this);
            $this->items->add($item);
        }
    }
95109
protected function insertAfterChild(Node $child, Node $node) {
    $this->childCount++;
    $node->parent = $this;
    if ($child->next === NULL) {
      $this->tail = $node;
    }
    else {
      $child->next->previous = $node;
    }
    $node->previous = $child;
    $node->next = $child->next;
    $child->next = $node;
    return $this;
  }
585688
public function addItem($item)
	{
		if( ! $item instanceof Model )
		{
			$item = new $this->defaultModel($item);
		}

		$this->data[] = $item;
	}
1268764
public function addItem(Item $item)
    {
        $this->items->put($item->getName(), $item);

        return $this;
    }
1236274
public function AttachContent($item, Content $content)
    {
        $item->SetContent($content);
        $item->Save();
        $content->SetContainerContent($item);
        $content->Save();
    }
568610
public function BeforeDelete($item)
    {
        $navPages = NavigationPage::Schema()->FetchByPage(false, $item);
        foreach ($navPages as $navPage)
        {
            $item = $navPage->GetItem();
            $tree = new TreeBuilder(new NavigationTreeProvider($item->GetNavigation()));
            $tree->Remove($item);
        }
    }
633218
public function addItem(Item $item, int $qty = 1): void
    {
        for ($i = 0; $i < $qty; ++$i) {
            $this->items->insert($item);
        }
        $this->logger->log(LogLevel::INFO, "added {$qty} x {$item->getDescription()}", ['item' => $item]);
    }
453915
public function augmentNewSiteTreeItem(&$item)
    {
        if (isset($_POST['PageTypeFake'])) {
            $item->PageTypeFake = $_POST['PageTypeFake'];
        }
        if (isset($_POST['PageTypeID'])) {
            $item->PageTypeID = $_POST['PageTypeID'];
        }
    }
1137098
public function push($queue, $item)
    {
        // Add the queue to the list of queues
        $this->getClient()->sadd($this->getKey(self::QUEUES_KEY), $queue);

        // Add the job to the specified queue
        $this->getClient()->rpush($this->getKey(self::QUEUE_KEY . $queue), json_encode($item));
    }
1128088
function Remove($item)
    {
        $prev = $this->provider->PreviousOf($item);
        $next = $this->provider->NextOf($item);
        if ($next)
        {
            $this->provider->SetPrevious($next, $prev);
        }
        $this->provider->Delete($item);
        if ($next) 
        {
            $this->provider->Save($next);
        }
    }
719430
public function push($item)
	{
		$full_class_name = $this->getFullClassName();

		if (is_array($item)) {
			array_push($this->items, new $full_class_name($item));
		}
		elseif ($item instanceof $full_class_name) {
			array_push($this->items, $item);
		}
	}
134694
public void insertChild(CmsTreeItem item, int position) {

        m_children.insert(item, position);
        adopt(item);
    }
426368
private function getNextItem(Tag $item, $items)
    {
        $currentItem = $items[0];

        while ($currentItem !== null and $currentItem !== $item) {
            $currentItem = next($items);
        }

        $next = next($items);

        return $next !== false ? $next : null;
    }
591098
def node_insert_before(self, node, new_node):
        """"""

        assert(not self.node_is_on_list(new_node))
        assert(node is not new_node)

        prev = self.node_prev(node)
        assert(prev is not None)
        self.node_set_prev(node, new_node)
        self.node_set_next(new_node, node)

        self.node_set_prev(new_node, prev)
        self.node_set_next(prev, new_node)
296020
public function writeItem($item)
    {
        if ($this->autoDetectHeader && !$this->header) {
            $this->handleAutoDetectHeader($item);
        }

        $this->table->addRow(
            $this->getValues($item, $this->getKeys($item))
        );
    }