@param StockItemInterface  $item
@param UomQty              $qty
@param Location            $srcLoc
@param Location            $destLoc
@param BatchInterface|null $batch

@return Movement
162338
public function createDraft(StockItemInterface $item, UomQty $qty,
        Location $srcLoc, Location $destLoc, ?BatchInterface $batch = null): Movement
    {
        $mvt = $this->movementFactory
            ->createDraft($item, $qty, $srcLoc, $destLoc);

        if (null == $batch) {
            $mvt->setBatch($mvt->getBatch());
        }

        $this->movementRepository->add($mvt);

        return $mvt;
    }
2702
public function process($item, $arguments = null, $inheritedScope = null)
    {
        self::trackTemplateUsed($this->chosen);
        return parent::process($item, $arguments, $inheritedScope);
    }
1324341
public function lastIndexOf($collection=null, $item=null) {
    list($collection, $item) = self::_wrapArgs(func_get_args(), 2);
    
    $collection = self::_collection($collection);
    
    krsort($collection);
    $__ = new self;
    return self::_wrap($__->indexOf($collection, $item));
  }
1265533
public function set(CacheItem $item): self
    {
        $driver = $this->getDriver();
        $driver->set($item->key, $item->value, $item->ttl);
        if ($this->hasEventListeners('itemSet')) {
            $this->dispatchEvent('itemSet', new \BearFramework\App\Cache\ItemSetEventDetails(clone($item)));
        }
        if ($this->hasEventListeners('itemChange')) {
            $this->dispatchEvent('itemChange', new \BearFramework\App\Cache\ItemChangeEventDetails($item->key));
        }
        return $this;
    }
1115201
public function updateItem(ItemInterface $item, $itemData, $locale, $userId)
    {
        return $this->itemManager->save($itemData, $locale, $userId, $item);
    }
693408
public function generate(StockItemInterface $item, UomQty $qty, Location $location,
        ?BatchInterface $batch = null): string
    {
        return strtoupper(substr(md5((string) mt_rand()), 0, 7));
    }
620118
protected function moveNode(Node\NodeInterface $item, $moveLeft, $moveRight, $moveLevel)
	{
		if ( ! empty($moveLeft)) {
			$item->moveLeftValue($moveLeft);
		}
		if ( ! empty($moveRight)) {
			$item->moveRightValue($moveRight);
		}
		if ( ! empty($moveLevel)) {
			$item->moveLevel($moveLevel);
		}
	}
490690
protected function addItem(Item $item, int $position = null): Item
	{
		/* @var $this IParent */
		$item->setParent($this);
		if ($position !== null) {
			Arrays::slice($this->items, $position, $item);
		} else {
			$this->items[] = $item;
		}
		return $item;
	}
551447
public function loadItems(StorableInterface $item = null)
    {
        if ($item !== null) {
            $this->setModel($item);
        }

        $query = $this->sqlLoad();
        return $this->loadItemsFromQuery($query, [], $item);
    }
556074
protected function storeItemInCache(CacheItemInterface $item)
    {
        $this->cache->setRawValue(
            $this->getHierarchyKey($item->getKey()),
            $item->get(),
            $item->getTags(),
            $item->getExpirationTimestamp()
        );
    }
13355
protected function buildItem(MenuItemInterface $item, string $extLabel = ''): string
    {
        try {
            $shortClass = (new ReflectionClass($item))->getShortName();
            $method = str_replace(BaseMenuItem::MENU_ITEM_CLASS_PREFIX, 'build', $shortClass);
            if (!method_exists($this, $method)) {
                $method = self::DEFAULT_RENDER_METHOD;
            }
        } catch (ReflectionException $e) {
            $method = self::DEFAULT_RENDER_METHOD;
        }

        $callable = [$this, $method];
        if (!is_callable($callable)) {
            throw new BadMethodCallException(sprintf('Method %s does not exist', $method));
        }
        $result = call_user_func($callable, $item, $extLabel, $item->getAttributes());
        $result .= !empty($item->getRawHtml()) ? $item->getRawHtml() : '';
        $result .= $item->renderViewElement($this->viewEntity);

        return $result;
    }
709041
public function chain($item=null) {
    list($item) = self::_wrapArgs(func_get_args(), 1);
    
    $__ = (isset($this) && isset($this->_chained) && $this->_chained) ? $this : __($item);
    $__->_chained = true;
    return $__;
  }
1221145
public function getReservedQty(StockItemInterface $item): UomQty
    {
        $units = $this->stockUnitRepository
            ->findReservedByStockItem($item);

        return $this->computeQtyForUnits($item->getUom(), $units);
    }
603515
public function serializeItem($item, TransformerAbstract $transformer = null, $resourceKey = null)
    {
        return $this->getFractalService()
            ->item($item, $transformer, $resourceKey);
    }
1135232
public function cache(CacheItemInterface $item)
    {
        $content = $this->execute();
        $item->set($content);

        return $item;
    }
1036535
public function addItem($item = null, $action = null)
    {
        if (is_string($item)) {
            $item = ['Item', $item];
        } elseif (is_array($item)) {
            array_unshift($item, 'Item');
        } elseif (!$item) {
            $item = ['Item'];
        }

        $item = $this->add($item)->setElement('a');

        if (is_string($action) || is_array($action)) {
            $action = $this->url($action);
        }

        if (is_string($action)) {
            $item->setAttr('href', $action);
        }

        if ($action instanceof jsExpressionable) {
            $item->js('click', $action);
        }

        return $item;
    }
65138
public final function saveDeferred(CacheItemInterface $item)
   {
        if (in_array($item, $this->queue)) {
            return false;
        }
        $this->queue[] = $item;
        return true;
   }