@param string $resourceClass

@return FamilyInterface[]
763891
public function getFamilies(string $resourceClass): array
    {
        $matchingFamilies = [];
        foreach ($this->familyRegistry->getFamilies() as $family) {
            if (ltrim($family->getDataClass(), '\\') === ltrim($resourceClass, '\\')) {
                $matchingFamilies[] = $family;
            }
        }

        return $matchingFamilies;
    }
810313
public function getChildrenOfClass($class)
    {
        // Check for namespace alias
        if (strpos($class, ':') !== false) {
            list($namespaceAlias, $simpleClassName) = explode(':', $class);
            $class = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
        }
        $result = array();
        $children = $this->getChildren();
        foreach ($children as $child) {
            if ($child->getPage() instanceof $class) {
                $result[] = $child;
            }
        }

        return $result;
    }
75281
protected function splitPropertyParts(string $property/*, string $resourceClass*/): array
    {
        $resourceClass = null;
        $parts = explode('.', $property);

        if (\func_num_args() > 1) {
            $resourceClass = func_get_arg(1);
        } elseif (__CLASS__ !== \get_class($this)) {
            $r = new \ReflectionMethod($this, __FUNCTION__);
            if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
                @trigger_error(sprintf('Method %s() will have a second `$resourceClass` argument in version API Platform 3.0. Not defining it is deprecated since API Platform 2.1.', __FUNCTION__), E_USER_DEPRECATED);
            }
        }

        if (null === $resourceClass) {
            return [
                'associations' => \array_slice($parts, 0, -1),
                'field' => end($parts),
            ];
        }

        $metadata = $this->getClassMetadata($resourceClass);
        $slice = 0;

        foreach ($parts as $part) {
            if ($metadata->hasAssociation($part)) {
                $metadata = $this->getClassMetadata($metadata->getAssociationTargetClass($part));
                ++$slice;
            }
        }

        if (\count($parts) === $slice) {
            --$slice;
        }

        return [
            'associations' => \array_slice($parts, 0, $slice),
            'field' => implode('.', \array_slice($parts, $slice)),
        ];
    }
417977
public function getCollection(string $resourceClass, string $operationName = null): iterable
    {
        $collection = $this->repository->findAll($resourceClass);

        return new Paginator(new GenericPaginatedDomainCollection((static function () use ($collection): iterable {
            foreach ($collection as $document) {
                yield $document->toProjection();
            }
        })(), $collection->getOffset(), $collection->getLimit(), (float) \count($collection), $collection->getTotalCount()));
    }
1171169
private function getOwnInterfaces($class, $parent)
    {
        $ownInterfaces = class_implements($class, false);

        if ($parent) {
            foreach (class_implements($parent, false) as $interface) {
                unset($ownInterfaces[$interface]);
            }
        }

        foreach ($ownInterfaces as $interface) {
            foreach (class_implements($interface) as $interface) {
                unset($ownInterfaces[$interface]);
            }
        }

        return $ownInterfaces;
    }
688798
protected function getModelClassForResource($resourceClass)
    {
        if (false === array_key_exists($resourceClass, $this->getModelClasses())) {
            throw new \InvalidArgumentException(sprintf('"%s" class not supported', $resourceClass));
        }

        return $this->getModelClasses()[$resourceClass];
    }
179131
private function classToNode(core_kernel_classes_Class $class, core_kernel_classes_Class $parent = null) {
        $returnValue = $this->buildClassNode($class, $parent);

        // allow the class to be opened if it contains either instances or subclasses
        $subclasses = $this->getSubClasses($class);

        if($this->showResources) {
            $options = array_merge(['recursive' => false], $this->optionsFilter);
            $queryBuilder = $this->getQueryBuilder($class, $this->propertyFilter, $options);
            $search = $this->getSearchService();
            $search->setLanguage($queryBuilder, \common_session_SessionManager::getSession()->getDataLanguage());
            $instancesCount = $search->getGateway()->count($queryBuilder);

            if ($instancesCount > 0 || count($subclasses) > 0) {
                if (in_array($class->getUri(), $this->openNodes)) {
                    $returnValue['state']	= 'open';
                    $returnValue['children'] = $this->buildChildNodes($class, $subclasses);
                } else {
                    $returnValue['state']	= 'closed';
                }

                // only show the resources count if we allow resources to be viewed
                $returnValue['count'] = $instancesCount;
            }
        } else {
            if(count($subclasses) > 0) {
                if (in_array($class->getUri(), $this->openNodes)) {
                    $returnValue['state'] = 'open';
                    $returnValue['children'] = $this->buildChildNodes($class, $subclasses);
                } else {
                    $returnValue['state'] = 'closed';
                }

                $returnValue['count'] = 0;
            }
        }
        return $returnValue;
    }
1124919
public static function getAllChildClasses($class): array
    {
        $type = gettype($class);
        $className = '';

        /* If input an object */
        if ($type == 'object') {
            $className = get_class($class);
        }

        /* If input a string */
        elseif ($type == 'string') {
            $className = $class;
        }

        $classes = [];

        /* Go through all classes */
        foreach (get_declared_classes() as $class) {
            if (is_subclass_of($class, $className)) {
                $classes[] = $class;
            }
        }

        return $classes;
    }
1184532
public function getClassBodyStyles(core_kernel_classes_Class $itemClass){
        $usages = [];
        $union = [];
        $intersect = [];
        $items = $itemClass->getInstances(true);
        $i = 0;
        foreach($items as $item){
            if($this->isQtiItem($item)){
                try{
                    $styles = $this->getBodyStyles($item);
                    $usages[$item->getUri()] = $styles;
                    if($i){
                        $intersect = array_intersect($styles, $intersect);
                    }else{
                        $intersect = $styles;
                    }
                    $union = array_unique(array_merge($styles, $union));
                    $i++;
                }catch(\common_Exception $e){}
            }
        }
        return [
            'all' => $union,
            'checked' => $intersect,
            'indeterminate' => array_values(array_diff($union, $intersect))
        ];
    }
477202
private function parseResource(ResourceMetadata $resourceMetadata, string $resourceClass, string $io, array $visited = []): array
    {
        $visited[] = $resourceClass;

        $options = [];
        $attributes = $resourceMetadata->getAttributes();

        if (isset($attributes['normalization_context'][AbstractNormalizer::GROUPS])) {
            $options['serializer_groups'] = $attributes['normalization_context'][AbstractNormalizer::GROUPS];
        }

        if (isset($attributes['denormalization_context'][AbstractNormalizer::GROUPS])) {
            if (isset($options['serializer_groups'])) {
                $options['serializer_groups'] += $attributes['denormalization_context'][AbstractNormalizer::GROUPS];
            } else {
                $options['serializer_groups'] = $attributes['denormalization_context'][AbstractNormalizer::GROUPS];
            }
        }

        return $this->getPropertyMetadata($resourceMetadata, $resourceClass, $io, $visited, $options);
    }
211045
public function getMany($relatedClass)
    {
        $table = ucfirst($relatedClass::getTable());
        $column = "shared{$table}List";
        return static::wrap($this->bean->$column, $relatedClass);
    }
778182
public function databaseIndexes($class, $aggregated = true)
    {
        $class = ClassInfo::class_name($class);
        if ($class === DataObject::class) {
            return [];
        }
        $this->cacheDatabaseIndexes($class);
        $indexes = $this->databaseIndexes[$class];
        if (!$aggregated) {
            return $indexes;
        }
        return array_merge($indexes, $this->databaseIndexes(get_parent_class($class)));
    }
1269580
private function buildChildNodes(core_kernel_classes_Class $class, $subclasses)
    {
        $children = [];

        // subclasses
        foreach ($subclasses as $subclass) {
            $children[] = $this->classToNode($subclass, $class);
        }
        // resources
        if ($this->showResources) {
            $limit = $this->limit;

            if (in_array($class->getUri(), $this->browsableTypes)) {
                $limit = 0;
            }

            $options = array_merge([
                'limit'     => $limit,
                'offset'    => $this->offset,
                'recursive' => false,
                'order'     => [OntologyRdfs::RDFS_LABEL => 'asc'],
            ], $this->optionsFilter);

            $queryBuilder = $this->getQueryBuilder($class, $this->propertyFilter, $options);
            $search = $this->getSearchService();
            $search->setLanguage($queryBuilder, \common_session_SessionManager::getSession()->getDataLanguage());
            $searchResult = $search->getGateway()->search($queryBuilder);
            foreach ($searchResult as $instance){
                $children[] = TreeHelper::buildResourceNode($instance, $class, $this->extraProperties);
            }
        }
        return $children;
    }
372303
public function getResourceEventsForFilter($restriction = null, $resourceClass = null)
    {
        $textEvents = $this->getEventsForBundle($restriction, $resourceClass);
        $sortedEvents = array();
        $sortedEvents['all'] = 'all';
        foreach ($textEvents as $textEvent) {
            if ($textEvent === null) {
                $sortedEvents['null'] = null;
            } elseif (0 === strpos($textEvent, 'resource')) {
                $sortedEvents[$textEvent] = 'log_' . $textEvent . '_filter';
            }
        }

        return $sortedEvents;
    }
1266900
protected function commandClassToArray(string $commandClass): array
    {
        /** @var CommandInterface $commandClass */
        return [
            $commandClass::getName(),
            $commandClass::getDescription(),
            $commandClass::getHelp(),
            $commandClass::getArguments(),
            $commandClass::getOptions(),
            [$commandClass, CommandInterface::COMMAND_METHOD_NAME],
        ];
    }
820883
public function getEntityRepositories($class)
    {
        $identifiers = $this->getEntityIdentifiers($class);

        foreach ($identifiers as $i => $identifier) {
            $identifiers[$i] = AnDomain::getRepository($identifier);
        }

        return $identifiers;
    }
451020
private function getParentClassNames(\ReflectionClass $reflectionClass)
    {
        $parentClassNames = [];

        while ($parent = $reflectionClass->getParentClass()) {
            $parentClassNames[] = $parent->getName();
            $reflectionClass = $parent;
        }

        return $parentClassNames;
    }