Check if the itemModel has been defined for that item

@access public
@author Joel Bout, <joel@taotesting.com>
@param  Resource item
@return boolean
330880
public function isItemModelDefined(core_kernel_classes_Resource $item)
    {
        $returnValue = (bool)false;

        if (!is_null($item)) {

            $model = $item->getOnePropertyValue($this->itemModelProperty);
            if ($model instanceof core_kernel_classes_Literal) {
                if (strlen((string)$model) > 0) {
                    $returnValue = true;
                }
            } else if (!is_null($model)) {
                $returnValue = true;
            }
        }

        return (bool)$returnValue;
    }
1204489
public function hasItem($identifier) {
        return isset($this->itemsPool[$this->prefix . '.' . $identifier]) || isset($this->itemsPool[$identifier]);
    }
91612
protected function checkVoteItem($item)
    {
        if ($item instanceof \Illuminate\Database\Eloquent\Model) {
            $this->setVoteRelation(get_class($item));
            return $item->id;
        };

        return $item;
    }
1328650
public function hasItemContent(core_kernel_classes_Resource $item, $lang = '')
    {
        if (is_null($item)) {
            return false;
        }

        if (empty($lang)) {
            $lang = $this->getSessionLg();
        }

        $itemContents = $item->getPropertyValuesByLg($this->itemContentProperty, $lang);
        return !$itemContents->isEmpty();
    }
860340
protected function _isItemActive(array $item): bool
    {
        if (empty($item['url'])) {
            return false;
        }
        $current = $this->_currentUrl;
        if (!empty($item['url']['plugin']) && $item['url']['plugin'] != $current['plugin']) {
            return false;
        }
        if ($item['url']['controller'] == $current['controller'] && $item['url']['action'] == $current['action']) {
            $this->_controllerActive = $current['controller'];
            $this->_actionActive = $item['url']['action'];

            return true;
        }
        if (!empty($this->_actionActive) && $item['url']['controller'] == $current['controller']) {
            $this->_controllerActive = $current['controller'];

            return true;
        }

        return false;
    }
1313347
protected function getItemModel() {
		try {
			return $this->getItem()->getUniquePropertyValue(new core_kernel_classes_Property(taoItems_models_classes_ItemsService::PROPERTY_ITEM_MODEL));
		} 
		catch (common_Exception $e) {
			return null;
		}
	}
996732
protected function checkType($item)
    {
        $type = $this->getItemType($item);
        if (! $this->type) {
            $this->type = $type;

            return true;
        }

        if ($this->type != $type) {
            return false;
        }

        return true;
    }
83247
public function isFunction($item=null) {
    list($item) = self::_wrapArgs(func_get_args(), 1);
    return self::_wrap(is_object($item) && is_callable($item));
  }
324733
public function has($property)
    {
        if (is_array($property)) {
            foreach ($property as $item) {
                if (is_a($this->{$item}, '\\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage')) {
                    return ($this->{$item}->count()) ? true : false;
                } else {
                    return (!empty($this->{$item})) ? true : false;
                }
            }
        } else {
            if (is_a($this->{$property}, '\\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage')) {
                return ($this->{$property}->count()) ? true : false;
            } else {
                return (!empty($this->{$property})) ? true : false;
            }
        }
    }
1049888
function(item) {
            if(!item || !item.type || !item.element)
                return false;

            switch(item.type) {
                case 'milestone':
                    return (item.element.hasClass('timeline-milestone'));
                    break;
                case 'smallItem':
                    return (item.element.hasClass('timeline-smallitem'));
                    break;
                case 'bigItem':
                    return (item.element.hasClass('timeline-bigitem'));
                    break;
                default:
                    return false;
                    break;
            }
        }
1132531
public function isDone($item) {
        //remove from local files list
        if(isset($this->data["files"]) && is_array($this->data["files"])) {
            if (isset($item->OriginalFile)) {
                $this->data["files"] = array_diff($this->data["files"], array($item->OriginalFile));
            }
            elseif (isset($item->SavedFile)) {
                $this->data["files"] = array_diff($this->data["files"], array($item->SavedFile));
            }
            elseif(isset($item->OriginalURL) && isset($this->data["pendingURLs"][$item->OriginalURL])) {
                $this->data["files"] = array_diff($this->data["files"], array($this->data["pendingURLs"][$item->OriginalURL]));
            }
        }
        //remove from pending URLs
        if(isset($item->OriginalURL)) {
            if(isset($this->data["pendingURLs"][$item->OriginalURL])) {
                unset($this->data["pendingURLs"][$item->OriginalURL]);
            }
            elseif(isset($this->data["urllist"]) && in_array($item->OriginalURL, $this->data["urllist"])) {
                $this->data["urllist"] = array_values(array_diff($this->data["urllist"], array($item->OriginalURL)));
            }
        }
    }
836159
public function hasFinalItem(): bool
    {
        foreach ($this->items as $item) {
            if ($item->hasEofMark() && !$item->hasFurther()) {
                return true;
            }
        }
        return false;
    }
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;
    }
503664
private boolean hasSelectedChildren(CmsTreeItem item) {

        for (String childId : m_childrens.get(item.getId())) {
            CmsTreeItem child = m_categories.get(childId);
            if (child.getCheckBox().isChecked() || hasSelectedChildren(child)) {
                return true;
            }
        }
        return false;
    }
924319
public function isCanRefill(Item $item, $field)
    {
        return in_array($field, $this->supported_fields) && $this->getSourceForFill($item);
    }
108303
public function hasItem($key)
    {
        if (!$this->getOptions()->getEnabled()) {
            return false;
        }

        $this->normalizeKey($key);

        $result = false;
        try {
            $result = $this->internalHasItem($key);
        } catch (\Exception $e) {
        }

        return $result;
    }
571428
protected function initElements()
    {
        parent::initElements();
        
        $elementId = tao_helpers_Uri::encode(taoItems_models_classes_ItemsService::PROPERTY_ITEM_MODEL);
        $ele = $this->form->getElement($elementId);
        $ele->feed();
        $modelUri = $ele->getEvaluatedValue();
        
        if (empty($modelUri)) {
            
            // remove deprecated models
            $statusProperty = new core_kernel_classes_Property(ItemModelStatus::CLASS_URI);
            $options = array();
            foreach ($ele->getOptions() as $optUri => $optLabel) {
                $model = new core_kernel_classes_Resource(tao_helpers_Uri::decode($optUri));
                $status = $model->getOnePropertyValue($statusProperty);
                if(!is_null($status) && $status->getUri() != ItemModelStatus::INSTANCE_DEPRECATED){
                    $options[$optUri] = $optLabel; 
                }
            }
            $ele->setOptions($options);
            if(count($options) === 1){
                reset($options);
                $ele->setValue(key($options));
            }

        } else {
            // replace radio with hidden element
            $this->form->removeElement($elementId);
            $itemModelElt = tao_helpers_form_FormFactory::getElement($elementId, 'Hidden');
            $itemModelElt->setValue($modelUri);
            $this->form->addElement($itemModelElt, true);
            
            // display model label
            $model = new core_kernel_classes_Resource($modelUri);
            $itemModelLabelElt = tao_helpers_form_FormFactory::getElement('itemModelLabel', 'Label');
            $itemModelLabelElt->setDescription(__('Item Model'));
            $itemModelLabelElt->setValue($model->getLabel());
            $this->form->addElement($itemModelLabelElt, true);
        }
    }