@param \eZ\Publish\API\Repository\Values\Content\Location $item

@return bool

@throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException
974175
public function isSatisfiedBy($item): bool
    {
        if ($this->copyLimit === -1) {
            return true;
        }

        if ($this->copyLimit === 0) {
            return false;
        }

        $query = new LocationQuery([
            'filter' => new Criterion\Subtree($item->pathString),
        ]);

        $searchResults = $this->searchService->findLocations($query);

        if ($this->copyLimit >= $searchResults->totalCount) {
            return true;
        }

        return false;
    }
309539
public function setItemData(Item $item, $tag, $value){
        if(!isset($this->data[$item])){
            throw new \InvalidArgumentException();
        }

        if(!in_array($tag, [Item::VALUE, Item::HIT, Item::EXPIRY_DATE])){
            throw new \InvalidArgumentException();
        }

        $data               = $this->data[$item];
        $data[$tag]         = $value;
        $this->data[$item]  = $data;
    }
534747
protected function checkIfProtected($item)
    {
        $this->performProtectedCheck($item);

        if (!is_string($item)) {
            return;
        }

        $prefix = $item;
        while (false !== $pos = strrpos($prefix, '.')) {
            $prefix = substr($item, 0, $pos);
            $this->performProtectedCheck($prefix);
            $prefix = rtrim($prefix, '.');
        }
    }
450646
private function createItemDirectoryPath(string $item)
    {
        $item = array_filter(explode('/', $item));
        array_pop($item);
        $item = implode('/', $item);

        return $item;
    }
924319
public function isCanRefill(Item $item, $field)
    {
        return in_array($field, $this->supported_fields) && $this->getSourceForFill($item);
    }
108664
public function isDate($item=null) {
    list($item) = self::_wrapArgs(func_get_args(), 1);
    return self::_wrap(is_object($item) && get_class($item) === 'DateTime');
  }
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;
    }
674766
public function isSideMenuItemActive($item)
    {
        if ($this->contextSideMenuItemCode === true) {
            $this->contextSideMenuItemCode = null;
            return true;
        }

        return $this->contextOwner == $item->owner && $this->contextSideMenuItemCode == $item->code;
    }
1079564
public function addItem($item)
    {
        if (!is_numeric($item)) {
            throw new \InvalidArgumentException(sprintf("Value '%s' must be a numeric value", $item));
        }

        $this->items[] = $item;

        return $this;
    }
16424
public function isAncestor(ItemInterface $item, $depth = null): bool
    {
        $request = $this->request_stack->getCurrentRequest();

        return 0 === strpos($request->getPathInfo(), $item->getUri());
    }
844802
public function isCached(CacheItemInterface $item = null)
    {
        if (!$item) {
            $key = $this->getCurrentKey();
            $item = $this->getItemStorage()->get($key);
        }

        return $item ? true : false;
    }
1152100
public function add($item)
    {
        $result = false;
        if (isset($item['id'])) unset($item['id']);
        if (!isset($item['profile'])) $item['profile'] = array();
        $item['profile'] = encodeOptions($item['profile']);
        if (Eresus_CMS::getLegacyKernel()->db->insert($this->table, $item))
            $result = $this->get(Eresus_CMS::getLegacyKernel()->db->getInsertedId());
        return $result;
    }
661518
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->removeImage($this);
            }
            $this->item = $item;
            // add link on this item
            if ($item instanceof Item) {
                $this->item->addImage($this);
            }
        }

        return $this;
    }
801293
public function contains($item)
    {
        if ($item instanceof AbstractEntity) {
            $item = $item->id;
        }
        foreach ($this->value as $entity) {
            $eId = $entity->id;
            if (!$this->isNull($eId) && $eId == $item) {
                return true;
            }
        }

        return false;
    }
182608
public function isChildOf(Geo $item){
        return ($this->left > $item->left) && ($this->right < $item->right) && ($this->depth == $item->depth+1);
    }
517776
public function insertItem($item,$position=0){
		$itemO=$this->beforeAddItem($item);
		 $start = array_slice($this->items, 0, $position);
		 $end = array_slice($this->items, $position);
		 $start[] = $item;
		 $this->items=array_merge($start, $end);
		 return $itemO;
	}
567010
public function addItem(BreadcrumbItem $item): void
    {
        if ($this->items->contains($item)) {
            throw new InvalidArgumentException(sprintf('Item « %s » is already in breadcrumb', $item));
        }

        $this->items->forAll(function ($key, &$item) {
            $item->setCurrent(false);

            return true;
        });

        $item->setCurrent();
        $this->items->add($item);
    }