Loops through subclasses of the owner (intended to be SiteTree) and checks if they've been hidden.

@return array
421100
public function getExcludedSiteTreeClassNames() {
		$classes = array();
		$siteTreeClasses = $this->owner->allowedChildren();
		foreach($siteTreeClasses as $class) {
			if(Injector::inst()->create($class)->config()->show_in_sitetree === false) {
				$classes[$class] = $class;
			}
		}
		return $classes;
	}
1250087
public function getOwnInterfaces()
    {
        $parent = $this->getParentClass();
        if ($parent !== false) {
            return array_diff_key($this->getInterfaces(), $parent->getInterfaces());
        } else {
            return $this->getInterfaces();
        }
    }
168415
public function getSetters(): array
    {
        if (null !== $this->setters) {
            return $this->setters;
        }
        $skip            = [
            'addPropertyChangedListener'     => true,
            'setEntityCollectionAndNotify'   => true,
            'addToEntityCollectionAndNotify' => true,
            'setEntityAndNotify'             => true,
        ];
        $this->setters   = [];
        $reflectionClass = $this->getReflectionClass();
        foreach ($reflectionClass->getMethods(
            \ReflectionMethod::IS_PRIVATE | \ReflectionMethod::IS_PUBLIC
        ) as $method) {
            $methodName = $method->getName();
            if (isset($skip[$methodName])) {
                continue;
            }
            if (\ts\stringStartsWith($methodName, 'set')) {
                $this->setters[$this->getGetterForSetter($methodName)] = $methodName;
                continue;
            }
        }

        return $this->setters;
    }
786615
static function showInvisibleNodes()
    {
        static $cachedResult;

        if ( !isset( $cachedResult ) )
        {
            $ini = eZINI::instance( 'site.ini' );
            $cachedResult = $ini->hasVariable( 'SiteAccessSettings', 'ShowHiddenNodes' ) ?
                            $ini->variable( 'SiteAccessSettings', 'ShowHiddenNodes' ) == 'true' :
                            true;
        }

        return $cachedResult;
    }
220028
public function PageTypes()
    {
        $classes = SiteTree::page_type_classes();

        $result = new ArrayList();

        foreach ($classes as $class) {
            $instance = SiteTree::singleton($class);
            if ($instance instanceof HiddenClass) {
                continue;
            }

            // skip this type if it is restricted
            $needPermissions = $instance->config()->get('need_permission');
            if ($needPermissions && !$this->can($needPermissions)) {
                continue;
            }

            $result->push(new ArrayData(array(
                'ClassName' => $class,
                'AddAction' => $instance->i18n_singular_name(),
                'Description' => $instance->i18n_classDescription(),
                'IconURL' => $instance->getPageIconURL(),
                'Title' => $instance->i18n_singular_name(),
            )));
        }

        $result = $result->sort('AddAction');

        return $result;
    }
302477
protected function getVisibleGroupedComponents()
    {
        $componentGroupsBuilder = ComponentGroup::query();
        if (!$this->guard->check()) {
            $componentGroupsBuilder->visible();
        }

        $usedComponentGroups = Component::grouped()->pluck('group_id');

        return $componentGroupsBuilder->used($usedComponentGroups)
            ->get();
    }
1084461
public function getChildrenNames()
    {
        if ($this->inheritanceColumn === null || !$this->inheritanceColumn->isEnumeratedClasses()) {
            return null;
        }
        $children = $this->inheritanceColumn->getChildren();
        $names = array();
        for ($i = 0, $size = count($children); $i < $size; $i++) {
            $names[] = get_class($children[$i]);
        }

        return $names;
    }
1312940
public function getDirtyRelations()
    {
        $dirtyRelations = [];
        foreach ($this->_relations as $relationName) {
            if (array_key_exists($relationName, $this->_oldRelationValue)) {
                $dirtyRelations[$relationName] = $this->owner->{$relationName};
            }
        }
        return $dirtyRelations;
    }
595262
public function allowedChildren() {
        $allowedChildren = array();
        $candidates = $this->stat('allowed_children');
        if($candidates && $candidates != "none") {
            foreach($candidates as $candidate) {
                // If a classname is prefixed by "*", such as "*Page", then only that
                // class is allowed - no subclasses. Otherwise, the class and all its subclasses are allowed.
                if(substr($candidate,0,1) == '*') {
                    $allowedChildren[] = substr($candidate,1);
                } else {
                    $subclasses = ClassInfo::subclassesFor($candidate);
                    foreach($subclasses as $subclass) {
                        $allowedChildren[] = $subclass;
                    }
                }
            }
        }
        
        return $allowedChildren;
    }
1227135
public function getPrivateVisibleFields()
    {
        $fields = $this->om->getRepository('ClarolineCoreBundle:Facet\FieldFacet')->findBy(array('isVisibleByOwner' => true));

        $data = [];

        foreach ($fields as $field) {
            if ($this->authorization->isGranted('ROLE_ADMIN')) {
                $canOpen = true;
                $canEdit = true;
            } else {
                $canOpen = $field->getIsVisibleByOwner();
                $canEdit = $field->getIsEditableByOwner();
            }

            $data[] = array(
                'id' => $field->getId(),
                'canOpen' => $canOpen,
                'canEdit' => $canEdit,
                'position' => $field->getPosition()
            );
        }

        $visibleFieldFacets = $this->getVisibleFieldFacets();

        foreach ($data as $field) {
            $found = false;

            foreach ($visibleFieldFacets as $visibleFieldFacet) {
                if ($field['id'] === $visibleFieldFacet['id']) {
                    $data[$field['position']]['canOpen'] = $field['canOpen'] | $visibleFieldFacet['canOpen'];
                    $data[$field['position']]['canEdit'] = $field['canEdit'] | $visibleFieldFacet['canEdit'];
                }
            }
        }

        return $data;
    }
696099
private function getEditorSnippetsAndClasses()
    {
        $obj = new stdClass();
        $obj->snippets = [];
        $u = new User();
        if ($u->isRegistered()) {
            $snippets = \Concrete\Core\Editor\Snippet::getActiveList();
            foreach ($snippets as $sns) {
                $menu = new stdClass();
                $menu->scsHandle = $sns->getSystemContentEditorSnippetHandle();
                $menu->scsName = $sns->getSystemContentEditorSnippetName();
                $obj->snippets[] = $menu;
            }
        }
        $c = Page::getCurrentPage();
        $obj->classes = [];
        if (is_object($c) && !$c->isError()) {
            $cp = new Permissions($c);
            if ($cp->canViewPage()) {
                $pt = $c->getCollectionThemeObject();
                if (is_object($pt)) {
                    if ($pt->getThemeHandle()) {
                        $obj->classes = $pt->getThemeEditorClasses();
                    } else {
                        $siteTheme = $pt::getSiteTheme();
                        if (is_object($siteTheme)) {
                            $obj->classes = $siteTheme->getThemeEditorClasses();
                        }
                    }
                }
            }
        } else {
            $siteTheme = PageTheme::getSiteTheme();
            if (is_object($siteTheme)) {
                $obj->classes = $siteTheme->getThemeEditorClasses();
            }
        }

        return $obj;
    }
679793
protected function getSiteDirs() {
    $sites_dir = $this->get('docroot') . '/sites';
    $sites = [];

    // If BLT's template has not yet been rsynced into the project root, it is
    // possible that docroot/sites does not exist.
    if (!file_exists($sites_dir)) {
      return $sites;
    }

    $finder = new Finder();
    $dirs = $finder
      ->in($sites_dir)
      ->directories()
      ->depth('< 1')
      ->exclude(['g', 'settings'])
      ->sortByName();
    foreach ($dirs->getIterator() as $dir) {
      $sites[] = $dir->getRelativePathname();
    }

    return $sites;
  }
870896
public function getVisibleSubClasses($name)
    {
        $remove  = [];
        $classes = ClassInfo::getValidSubClasses($name);
        
        foreach ($classes as $class) {
            
            $instance = Injector::inst()->get($class);
            
            if ($ancestor = $instance->stat('hide_ancestor')) {
                $remove[strtolower($ancestor)] = $ancestor;
            }
            
            if ($instance instanceof HiddenClass) {
                $remove[strtolower($class)] = $class;
            }
            
        }
        
        return array_diff_key($classes, $remove);
    }
976384
public function hidden()
    {
        $class = $this->model; // Must be a local var to test

        // There aren't multiple locales specified
        if (count(config('decoy.site.locales')) <= 1 ) return true;

        // We're editing a model with no locale attribute
        if ($this->item && !$this->item->locale) return true;

        // The model was explicitly disabled
        if ($class::$localizable === false ) return true;

        // Auto localize is turned on and we're on a child model
        if (config('decoy.site.auto_localize_root_models')
            && app('decoy.wildcard')->detectParent()) return true;

        // If auto-localizeable is turned off and this model doesn't have it
        // turned on
        if (!config('decoy.site.auto_localize_root_models')
            && !$class::$localizable) return true;

        // Otherwise, allow localization
        return false;
    }
1192057
public function getRelatedProperties()
    {
        //return $this->treeType->getCmsTreeTypeProperties();
        if (isset(self::$_treeTypes[$this->tree_type_id])) {
            $treeType = self::$_treeTypes[$this->tree_type_id];
        } else {
            self::$_treeTypes[$this->tree_type_id] = $this->treeType;
            $treeType = self::$_treeTypes[$this->tree_type_id];
        }
        if (!$treeType) {
            return CmsTreeTypeProperty::find()->where(['id' => null]);
        }
        //return $this->treeType->getCmsTreeTypeProperties();
        return $treeType->getCmsTreeTypeProperties();
    }
1052757
public function additionalSolrValues() {

		if(($this->owner->CanViewType === 'Inherit') && $this->owner->ParentID) {

			// Recursively determine the site tree element permissions where required.

			return $this->owner->Parent()->additionalSolrValues();
		}
		else if($this->owner->CanViewType === 'OnlyTheseUsers') {

			// Return the listing of groups that have access.

			$groups = array();
			foreach($this->owner->ViewerGroups() as $group) {
				$groups[] = (string)$group->ID;
			}
			return array(
				$this->index => $groups
			);
		}
		else if($this->owner->CanViewType === 'LoggedInUsers') {

			// Return an appropriate flag for logged in access.

			return array(
				$this->index => array(
					'logged-in'
				)
			);
		}
		else {

			// Return an appropriate flag for general public access.

			return array(
				$this->index => array(
					'anyone'
				)
			);
		}
	}
207671
public function getDefaultElements()
    {
        $relations = $this->owner->uninherited('element_defaults');
        if (!$relations) $relations = [];

        // inherit relations from another PageType
        if ($inherit_relations_from = $this->owner->uninherited('element_relations_inherit_from'))
        {
            if ($inherit_relations = Config::inst()->get($inherit_relations_from, 'element_defaults', Config::UNINHERITED))
            {
                $relations = array_merge_recursive($relations, $inherit_relations);
            }
        }
        return $relations;
    }