/*!
Checks if at least one content class has been selected.
346918
function validateClassData( $package, $http, $currentStepID, &$stepMap, &$persistentData, &$errorList )
    {
        $classList = array();
        if ( $http->hasPostVariable( 'ClassList' ) )
            $classList = $http->postVariable( 'ClassList' );

        $persistentData['classlist'] = $classList;

        $result = true;
        if ( count( $classList ) == 0 )
        {
            $errorList[] = array( 'field' => ezpI18n::tr( 'kernel/package', 'Class list' ),
                                  'description' => ezpI18n::tr( 'kernel/package', 'You must select at least one class for inclusion' ) );
            $result = false;
        }
        return $result;
    }
39150
function (el) {
        return !isElement(el)
            || el.disabled
            || el.classList.contains('disabled')
            || Boolean(el.getAttribute('disabled'))
    }
1083679
protected function isSelected($value)
    {
        $selectedValue = $this->getSelectedValue();
        if ($value === $selectedValue || (string)$value === $selectedValue) {
            return true;
        }
        if ($this->hasArgument('multiple')) {
            if ($selectedValue === null && $this->arguments['selectAllByDefault'] === true) {
                return true;
            } elseif (is_array($selectedValue) && in_array($value, $selectedValue)) {
                return true;
            }
        }
        return false;
    }
609996
function hasClass(className) {
  var i, val;
  for(i = 0;i < this.length;i++) {
    val = this.get(i).getAttribute(attr);
    val = val ? val.split(/\s+/) : [];
    if(~val.indexOf(className)) {
      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;
    }
1272192
function hasObjectAttributeContent( $contentObjectAttribute )
    {
        $page = $contentObjectAttribute->content();
        $zones = $page->attribute( 'zones' );
        if ( !is_array( $zones ) )
            return false;

        foreach ( $zones as $zone )
        {
            if ( $zone->getBlockCount() > 0 )
                return true;
        }

        return false;
    }
1039639
private function checkSingleValuedContent(&$content)
    {
        if (is_string($content) and ! $this->isSingleValued()) {
            $content = array_map('trim', explode(' ', $content));
        }
    }
938535
public function hasClass($className)
    {
        if(strlen($className) < 1)
        {
            throw new HTMLTagException("Class name is empty");
        }

        if($this->hasAttribute("class"))
        {
            $classes = $this->getClasses();

            foreach(explode(" ",$classes) as $class) {
                if(strtolower($class) == strtolower($className)) {
                    return true;    // We found it.
                }
            }

        }

        return false;
    }
1146202
function checkIfStyleCanBeChildOf( def, currentParent, elementName, isUnknownElement ) {
		return currentParent &&
			( ( currentParent.getDtd() || CKEDITOR.dtd.span )[ elementName ] || isUnknownElement ) &&
			( !def.parentRule || def.parentRule( currentParent ) );
	}
1333852
function checkSelectionChange()
	{
		try
		{
			// In IE, the "selectionchange" event may still get thrown when
			// releasing the WYSIWYG mode, so we need to check it first.
			var sel = this.getSelection();
			if ( !sel || !sel.document.getWindow().$ )
				return;

			var firstElement = sel.getStartElement();
			var currentPath = new CKEDITOR.dom.elementPath( firstElement );

			if ( !currentPath.compare( this._.selectionPreviousPath ) )
			{
				this._.selectionPreviousPath = currentPath;
				this.fire( 'selectionChange', { selection : sel, path : currentPath, element : firstElement } );
			}
		}
		catch (e)
		{}
	}
53891
public function hasSelectors()
    {
        if ($this->isReference() && $this->getProject() !== null) {
            return $this->getRef($this->getProject())->hasSelectors();
        }

        return !empty($this->selectorsList);
    }
397090
function checkChildren( children, newParentName ) {
		var allowed = DTD[ newParentName ];

		for ( var i = 0, l = children.length, child; i < l; ++i ) {
			child = children[ i ];
			if ( child.type == CKEDITOR.NODE_ELEMENT && !allowed[ child.name ] )
				return false;
		}

		return true;
	}
174170
public function hasContent()
    {
        foreach ($this->getEntries() as $node) {
            if ($node instanceof Content) {
                return true;
            } elseif ($node instanceof self) {
                if ($node->hasContent()) {
                    return true;
                }
            }
        }

        return false;
    }
237867
function ( state ) {
            if ( typeof document.documentElement.onselectstart === 'undefined' ) {
                //FF
                this.selectEnable = function ( state ) {
                    //this.element().style.MozUserSelect = (state)? 'text' : 'none';
                    this.element().onmousedown = (state)? null : function (e) { return false; };
                };
            } else {
                this.selectEnable = function ( state ) {
                    this.element().onselectstart = (state)? null : function (e) { return false; };
                };
            }
            this.selectEnable( state );
        }
1144272
private boolean hasSelectedChildren(List<CmsCategoryTreeEntry> children, Collection<String> selectedCategories) {

        boolean result = false;
        if (children == null) {
            return false;
        }
        for (CmsCategoryTreeEntry child : children) {
            result = selectedCategories.contains(child.getSitePath());
            if (result || hasSelectedChildren(child.getChildren(), selectedCategories)) {
                return true;
            }
        }

        return result;
    }
578477
public function isAccepted($value, $var = null)
    {
        if ($this->getContentInstance() instanceof ContentSet) {
            if (!($value instanceof AbstractClassContent)) {
                // ContentSet accepts only AbstractClassContent elements
                return false;
            }

            if (in_array('!' . $this->_getType($value), $this->_accept)) {
                // ContentSet can exclude content types
                return false;
            }

            $acceptArray = array_filter($this->_accept, function($item) { return '!' !== substr($item, 0, 1); });
        } else {
            if (null === $var) {
                return false;
            }

            if (!array_key_exists($var, $this->_accept)) {
                return true;
            }

            $acceptArray = $this->_accept[$var];
        }

        if (0 === count($acceptArray)) {
            return true;
        }

        return in_array($this->_getType($value), $acceptArray);
    }
170595
private void checkSelection() {

        m_okButton.disable(Messages.get().key(Messages.GUI_UPLOAD_BUTTON_OK_DISABLE_CHECKING_0));

        if (!m_selectionDone) {
            m_firstContentHeight = CmsDomUtil.getCurrentStyleInt(m_scrollPanel.getElement(), CmsDomUtil.Style.height);
            m_firstInfoHeight = m_dialogInfo.getOffsetHeight();
            m_firstSummaryHeight = m_selectionSummary.getOffsetHeight();
        }

        CmsRpcAction<CmsUploadFileBean> callback = new CmsRpcAction<CmsUploadFileBean>() {

            /**
             * @see org.opencms.gwt.client.rpc.CmsRpcAction#execute()
             */
            @Override
            public void execute() {

                List<String> filesToCheck = new ArrayList<String>(getFilesToUpload().keySet());
                filesToCheck.removeAll(getFilesToUnzip(false));
                getUploadService().checkUploadFiles(filesToCheck, getTargetFolder(), m_isTargetRootPath, this);
            }

            /**
             * @see org.opencms.gwt.client.rpc.CmsRpcAction#onResponse(java.lang.Object)
             */
            @Override
            protected void onResponse(CmsUploadFileBean result) {

                proceedWorkflow(result);
            }
        };
        callback.execute();
    }