return true if the tree until this category is active.

@return bool
544507
public function parentCategoriesAreActive()
    {
        $treeIsActive = true;
        $parentCategoryList = $this->getParentCategories();
        while ($category = $parentCategoryList->Next()) {
            if (false === $category->fieldActive) {
                $treeIsActive = false;
                break;
            }
        }

        return $treeIsActive;
    }
934795
public function isTree()
    {
        try {
            $root = $this->getVertexRoot();
        }
        catch (UnderflowException $e) {
            return false;
        }
        catch (UnexpectedValueException $e) {
            return false;
        }

        try {
            $num = count($this->getVerticesSubtree($root));
        }
        catch (UnexpectedValueException $e) {
            return false;
        }

        // check number of vertices reachable from root should match total number of vertices
        return ($num === count($this->graph->getVertices()));
    }
792908
public function isActive()
    {
        $blActive = false;
        $sId = $this->getId();
        if (!is_null($sId)) {
            $blActive = !$this->_isInDisabledList($sId);
            if ($blActive && $this->hasExtendClass()) {
                $blActive = $this->_isExtensionsActive();
            }
        }

        return $blActive;
    }
994509
public function canApply()
    {
        $nodeType = $this->getSubject()->getNodeType();

        return $this->getSiblingNode()->getParent()->isNodeTypeAllowedAsChildNode($nodeType);
    }
52911
public function valid()
    {
        if (is_null($this->current)) {
            return true;
        }
        if ($this->current instanceof RecursiveLeafInterface) {
            return $this->current->valid();
        }

        return false;
    }
872966
public function checkIfReady()
    {
        if (!$this->attrs->paramsDone || !$this->attrs->inputDone) {
            return false;
        }
        if (isset($this->appInstance->passphrase)) {
            if (!isset($this->attrs->server['PASSPHRASE'])
                || ($this->appInstance->passphrase !== $this->attrs->server['PASSPHRASE'])
            ) {
                $this->finish();
            }

            return false;
        }

        if ($this->attrs->input->isFrozen()) {
            return false;
        }

        if ($this->sleepTime === 0) {
            $this->wakeup();
        }

        return true;
    }
421801
private function hasToBeReloaded()
    {
        if (!$this->getWurflConfig()->allowReload) {
            return false;
        }

        $state = $this->getPersistenceStorage()->load(self::WURFL_API_STATE);

        return !$this->isStateCurrent($state);
    }
430252
public function isActive()
    {
        return $this->exists &&
                isset($this->_gemsData['gap_status']) &&
                $this->agenda->isStatusActive($this->_gemsData['gap_status']);
    }
385782
public function hasLoop()
	{
		foreach( $this->getNodes() as $node )
			if( $this->isLoop( $node ) )
				return true;
		return false;
	}
23358
public function has_items() {
        if ($this->duringinstall) {
            return false;
        } else if ($this->hasitems !== false) {
            return true;
        }
        if (count($this->children) > 0 || count($this->prependchildren) > 0) {
            // There have been manually added items - there are definitely items.
            $outcome = true;
        } else if (!$this->ignoreactive) {
            // We will need to initialise the navigation structure to check if there are active items.
            $this->page->navigation->initialise($this->page);
            $outcome = ($this->page->navigation->contains_active_node() || $this->page->settingsnav->contains_active_node());
        }
        $this->hasitems = $outcome;
        return $outcome;
    }
758029
public function find_active_node() {
        if ($this->isactive) {
            return $this;
        } else {
            foreach ($this->children as &$child) {
                $outcome = $child->find_active_node();
                if ($outcome !== false) {
                    return $outcome;
                }
            }
        }
        return false;
    }
854158
public function isCurrent()
    {
        $currentPage = Director::get_current_page();

        if ($currentPage instanceof ContentController) {
            $currentPage = $currentPage->data();
        }
        if ($currentPage instanceof CatalogueCategory || $currentPage instanceof CatalogueProduct) {
            return $currentPage === $this->owner || $currentPage->ID === $this->owner->ID;
        }
        return false;
    }
784713
public function has_children() {
        return ($this->nodetype === navigation_node::NODETYPE_BRANCH || $this->children->count()>0 || $this->isexpandable);
    }
1121903
public function isSection() {
		if ($this->isCurrent()) {
			return true;
		}
		$ancestors = $this->getAncestors();
		if (Director::get_current_page() instanceof Page) {
			$node = Director::get_current_page()->asMenuItem();
			if ($node) {
				$ancestors = $node->getAncestors();
				return $ancestors && in_array($this->ID, $node->getAncestors()->column());
			}
			
		}
		return false;
	}
464867
public function isSuccessful()
    {
        if ($this->getState() === static::STATE_NOT_RUNNING) {
            foreach ($this->items as $run) {
                if (!$run->isSuccessful()) {
                    return false;
                }
            }
            return true;
        }
        return false;
    }
939502
public function TreeIsFiltered() {
        return ($this->request->getVar('q') || $this->request->getVar('tag') || $this->request->getVar('creator'));
    }
193766
public function has_active_instances() {
        global $DB;
        if (empty($this->definition->id)) {
            return false;
        }
        if ($this->hasactiveinstances === null) {
            $conditions = array('definitionid'  => $this->definition->id,
                        'status'  => gradingform_instance::INSTANCE_STATUS_ACTIVE);
            $this->hasactiveinstances = $DB->record_exists('grading_instances', $conditions);
        }
        return $this->hasactiveinstances;
    }