Checks whether the Index Queue contains a specific item.

@param string $itemType The item's type, usually a table name.
@param int $itemUid The item's uid
@return bool TRUE if the item is found in the queue, FALSE otherwise
428577
public function containsItem(string $itemType, int $itemUid) : bool
    {
        return (bool)$this->getQueryBuilderForContainsMethods($itemType, $itemUid)->execute()->fetchColumn(0);
    }
988972
public function has(string $type, string $id): bool
    {
        return array_key_exists($this->buildArrayKey($type, $id), $this->collection);
    }
381662
public function getLocalizableItemChangedTime(string $itemType, int $itemUid) : int
    {
        $localizedChangedTime = 0;

        if ($itemType === 'pages') {
            $itemType = 'pages_language_overlay';
        }

        if (isset($GLOBALS['TCA'][$itemType]['ctrl']['transOrigPointerField'])) {
            // table is localizable
            $translationOriginalPointerField = $GLOBALS['TCA'][$itemType]['ctrl']['transOrigPointerField'];

            $queryBuilder = $this->getQueryBuilder();
            $queryBuilder->getRestrictions()->removeAll();
            $localizedChangedTime = $queryBuilder
                ->add('select', $queryBuilder->expr()->max('tstamp', 'changed_time'))
                ->from($itemType)
                ->orWhere(
                    $queryBuilder->expr()->eq('uid', $itemUid),
                    $queryBuilder->expr()->eq($translationOriginalPointerField, $itemUid)
                )->execute()->fetchColumn(0);
        }

        return (int)$localizedChangedTime;
    }
572046
public function hasIndex($index, $collection)
    {
        if (empty($this->queriesResultCache[ 'collectionIndexes' ][ $collection ])) {
            $this->getIndexes($collection);
        }

        return (bool)in_array($index, $this->queriesResultCache[ 'collectionIndexes' ][ $collection ]);
    }
18992
public static function getItemDescriptionByKey($itemKey)
    {
        $itemKey = strtoupper($itemKey);
        if (isset(self::$availableItemKeysList[$itemKey])) {
            return self::$availableItemKeysList[$itemKey];
        } else {
            return false;
        }
    }
442764
public function index(Item $item)
    {
        $indexed = true;

        $this->type = $item->getType();
        $this->setLogging($item);

        $solrConnections = $this->getSolrConnectionsByItem($item);
        foreach ($solrConnections as $systemLanguageUid => $solrConnection) {
            $this->solr = $solrConnection;

            if (!$this->indexItem($item, $systemLanguageUid)) {
                /*
                 * A single language voting for "not indexed" should make the whole
                 * item count as being not indexed, even if all other languages are
                 * indexed.
                 * If there is no translation for a single language, this item counts
                 * as TRUE since it's not an error which that should make the item
                 * being reindexed during another index run.
                 */
                $indexed = false;
            }
        }

        return $indexed;
    }
1363751
protected function getQueryBuilderForContainsMethods(string $itemType, int $itemUid) : QueryBuilder
    {
        $queryBuilder = $this->getQueryBuilder();
        return $queryBuilder->count('uid')->from($this->table)
            ->andWhere(
                $queryBuilder->expr()->eq('item_type', $queryBuilder->createNamedParameter($itemType)),
                $queryBuilder->expr()->eq('item_uid', $itemUid)
            );
    }
1027622
public static function GetUrlForDetails(int $itemType = GnUrlItemType::Community, string $itemKey = NULL)
    {
        switch ($itemType) {
            case GnUrlItemType::Community:
                return static::$HomeUrl . "/community/index/?profileTag={$itemKey}";
            case GnUrlItemType::Event:
                return static::$HomeUrl . "/event/detail/{$itemKey}";
            case GnUrlItemType::Impression:
                return static::$HomeUrl . "/impression/detail/{$itemKey}";
            case GnUrlItemType::Nose:
                return static::$HomeUrl . "/{$itemKey}";
            case GnUrlItemType::PoI:
                return static::$HomeUrl . "/poi/detail/{$itemKey}";
            case GnUrlItemType::Track:
                return static::$HomeUrl . "/tour/detail/{$itemKey}";
        }

        throw new GnException("unexpected itemType={$itemType}");
    }
1204881
public function isAssigned($itemName,$userId)
	{
		return $this->db->createCommand()
			->select('itemname')
			->from($this->assignmentTable)
			->where('itemname=:itemname AND userid=:userid', array(
				':itemname'=>$itemName,
				':userid'=>$userId))
			->queryScalar() !== false;
	}
159131
public function matchItem(ItemInterface $item)
    {
        $request = $this->requestStack->getCurrentRequest();

        $parent = $item->getParent();

        while (null !== $parent->getParent()) {
            $parent = $parent->getParent();
        }

        if ($item->getUri() === $request->getRequestUri() or
            $item->getUri() === $request->attributes->get('__current_folder_path', false)
        ) {
            // URL's completely match
            return true;
        } elseif (
            $item->getUri() !== $request->getBaseUrl().'/' and
            $item->getUri() !== $request->getBaseUrl().'/admin/' and
            $item->getUri() === substr($request->getRequestUri(), 0, strlen($item->getUri())) and
            $request->attributes->get('__selected_inheritance', true) and
            $parent->getExtra('select_intehitance', true)
        ) {
            // URL isn't just "/" and the first part of the URL match
            return true;
        }

        return false;
    }
872409
public static function isWatching($item_id, $item_type, $created_by)
	{
		if ($item_id && $item_type && $created_by)
		{
			$total = self::all()
				->whereEquals('state', 1)
				->whereEquals('created_by', (int)$created_by)
				->whereEquals('item_id', (int)$item_id)
				->whereEquals('item_type', (string)$item_type)
				->total();

			if ($total)
			{
				return true;
			}
		}

		return false;
	}
873622
@Override
    public boolean isItemExist(Map<String, String> item) throws WidgetException {
        try {
            List<Map<String, String>> tableData = getTableDataInMap();
            for (Map<String, String> rowData : tableData) {
                boolean found = true;
                for (Map.Entry<String, String> expectedEntry : item.entrySet()) {
                    String actual = rowData.get(expectedEntry.getKey());

                    if (!actual.equals(expectedEntry.getValue())) {
                        found = false;
                    }
                }

                if (found) {
                    return true;
                }
            }

            return false;
        } catch (Exception e) {
            throw new WidgetException("Error while determining whether item " + item
                    + " exists in table", generateXPathLocator(), e);
        }
    }
782950
def check(self, item_id):
        
        try:
            return self.jbx.info(item_id).get('status').lower() == 'finished'
        except jbxapi.JoeException:
            return False

        return False
913127
public function hasChild($itemName, $childName)
    {
        $children = $this->getChildren($itemName);
        if (in_array($childName, $children)) {
            return true;
        }
        return false;
    }
552172
public function has($itemName)
        {
            return Arrays::exists($itemName, $this->_store) && isset($this->_store[$itemName]['lookupType']);
        }
1124262
public function itemUpdateListingType($item_id, $listing_type)
    {
        // TODO: Tests
        $response = $this->getGuzzleClient()
            ->post(
                '/items/' . $item_id . '/listing_type',
                array_merge(
                    $this->setQuery(),
                    $this->setBodyArray(['id' => $listing_type])
                )
            );

        return $this->serializer->deserialize(
            $response->getBody()->getContents(),
            Item::class,
            'json'
        );
    }
619169
public function microData($itemType, $itemProp)
    {
        //====================================================================//
        // Safety Checks ==> Verify a new Field Exists
        if (empty($this->new)) {
            Splash::log()->err("ErrFieldsNoNew");
        } else {
            //====================================================================//
            // Update New Field structure
            $this->new->itemtype = $itemType;
            $this->new->itemprop = $itemProp;
            $this->setTag($itemProp.IDSPLIT.$itemType);
        }

        return $this;
    }