does menu item should be placed before or after child item

@param Fluent $item
@param String $after
@return boolean
197623
protected function lookForChild($item, $after)
    {
        if (str_contains($after, '.')) {
            $found = [];
            $this->lookInDeep($this->items, $after, $item, $found);
            if (!empty($found)) {
                $this->items[key($found)]->childs = current($found);
                return $item;
            }
        }
        return false;
    }
835518
public function addItem($item)
    {
        $indentation = $this->indent($this->indentation);

        $this->buffer[] = $indentation.$item;
    }
1099581
def item_before(self, item):
        
        prev_iter = self._prev_iter_for(item)
        if prev_iter is not None:
            return self._object_at_iter(prev_iter)
585133
public function remove($item)
    {
        if ($item->parent() === $this->parentNode) {
            $this->checkUnlocked($item);
            $item->internalUnsetParent();
            parent::remove($item);
        }

        return $this;
    }
160791
public function previous()
    {
        $this->_itemValid = true;

        if (!prev($this->_items)) {
            $this->_itemValid = false;
        } else {
            $this->_itemPosition--;
        }
    }
722760
private static function isSorted($item)
    {
        return
            (is_object($item) && null !== $item->getPosition())
            ||
            (is_array($item) && isset($item[static::POSITION_KEY]));
    }
311842
protected function checkDateTimeOrder($format, $before, $after)
    {
        $before = $this->getDateTimeWithOptionalFormat($format, $before);

        $after = $this->getDateTimeWithOptionalFormat($format, $after);

        return ($before && $after) && ($after > $before);
    }
1333545
public function isSatisfiedBy($item): bool
    {
        return $this->one->isSatisfiedBy($item) && $this->two->isSatisfiedBy($item);
    }
825149
public function shouldBeIncluded($item)
    {
        if (!is_object($item)) {
            return false;
        }

        $pageId = $this->getPageId($item);
        $showInMenu = get_field('hide_in_menu', $pageId) ? !get_field('hide_in_menu', $pageId) : true;
        $isNotTopLevelItem = !($item->post_type === 'page' && isset($item->post_parent) && $item->post_parent === 0);
        $showTopLevel = $this->args['include_top_level'];

        return ($showTopLevel || $isNotTopLevelItem) && $showInMenu;
    }
1276120
public function setItem(Item $item)
    {
        $this->childOf = $item->id;
        $this->_item = $item;
        
        return $this;
    }
806036
public function prePersist(Item $item, LifecycleEventArgs $event)
    {
        $interaction = $item->getInteraction();
        if (null !== $interaction) {
            $event->getEntityManager()->persist($interaction);
        }
    }
773605
public function isMainMenuItemActive($item)
    {
        return $this->contextOwner == $item->owner && $this->contextMainMenuItemCode == $item->code;
    }
1013173
public function after($response)
	{
		if (empty($response))
		{
			$response = $this->template;
		}

		return parent::after($response);
	}
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;
    }
879848
public function add_child_item(cc_i_item &$item) {
        if (is_null($this->childitems)) {
            $this->childitems = array();
        }
        $this->childitems[$item->identifier] = $item;
    }
114681
public function push($item)
    {
        $this->onBeforeInsert($item);
        $item->setContainerFieldList($this);

        return parent::push($item);
    }
227074
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->removeSource($this);
            }
            $this->item = $item;
            // add link on this item
            if ($item instanceof Item) {
                $this->item->addSource($this);
            }
        }

        return $this;
    }