Gets field group instance

@param String $classname
@return FieldGroup
175410
protected function getGroup($classname)
    {
        $category = FieldCategory::query()->firstOrCreate([
            'name' => strtolower(last(explode('\\', $classname)))
        ]);
        return FieldGroup::query()->firstOrCreate([
                    'category_id' => $category->id,
                    'name'        => $category->name,
        ]);
    }
140345
public function lookupSingletonSessionBean($className)
    {
        if ($this->getSingletonSessionBeans()->has($className) === true) {
            return $this->getSingletonSessionBeans()->get($className);
        }
    }
1117901
protected function getUserGroup($groupName)
    {
        $groupName = "admin:$groupName";

        $group = $this->userGroupFactory->getGroup($groupName);
        if (!$group) {
            $this->userGroupFactory->create($groupName);
            $group = $this->userGroupFactory->getGroup($groupName);
        }

        return $group;
    }
437912
static public function getParents($className)
    {
        $parents = [];
        $parent = new \ReflectionClass($className);
        while (true) {
            $parent = $parent->getParentClass();
            if (!$parent) {
                break;
            } else {
                $parents[] = $parent->getName();
            }
        }
        return $parents;
    }
1357777
public function getConfigs($className)
    {
        if (\is_object($className)) {
            $className = ClassUtils::getClass($className);
        }

        if (!array_key_exists($className, $this->configs)) {
            $this->configs[$className] = [[], []];
            $meta = $this->om->getClassMetadata($className);
            $this->addConfigFields($meta, $className);
            $this->addConfigAssociations($meta, $className);
        }

        return $this->configs[$className];
    }
369870
public function getDocument($className)
    {
        if (isset($this->documents[$className])) {
            return $this->documents[$className];
        }
        if (!isset($this->mappings[$className])) {
            throw new \InvalidArgumentException(sprintf('No mapping found for document "%s"', $className));
        }

        return $this->documents[$className] = $this->processDocument(
            $className,
            $this->mappings[$className]['doctrine'],
            $this->mappings[$className]['serializer'],
            $this->mappings[$className]['schema']
        );
    }
1321389
private function getField($fieldname)
    {
        if (array_key_exists($fieldname, $this->colmodel)) {
            return $this->colmodel[$fieldname];
        } else {
            return false;
        }
    }
70878
public static function getMappedClassName($className)
    {
        $mappedName = array_search($className, self::$classMap);

        if ($mappedName) {
            return $mappedName;
        }

        $mappedName = array_search($className, array_flip(self::$classMap));

        if ($mappedName) {
            return $mappedName;
        }

        return false;
    }
1276233
public function getField($fieldName)
    {
        if (!array_key_exists($fieldName, $this->_fields)) {
            include_once 'Zend/Search/Lucene/Exception.php';
            throw new Zend_Search_Lucene_Exception("Field name \"$fieldName\" not found in document.");
        }
        return $this->_fields[$fieldName];
    }
334618
public function getFieldAliases($className) {
        $fieldAliases= array ();
        if ($className= $this->loadClass($className)) {
            if ($ancestry= $this->getAncestry($className)) {
                for ($i= count($ancestry) - 1; $i >= 0; $i--) {
                    if (isset ($this->map[$ancestry[$i]]['fieldAliases'])) {
                        $fieldAliases= array_merge($fieldAliases, $this->map[$ancestry[$i]]['fieldAliases']);
                    }
                }
            }
            if ($this->getInherit($className) === 'single') {
                $descendants= $this->getDescendants($className);
                if ($descendants) {
                    foreach ($descendants as $descendant) {
                        $descendantClass= $this->loadClass($descendant);
                        if ($descendantClass && isset($this->map[$descendantClass]['fieldAliases'])) {
                            $fieldAliases= array_merge($fieldAliases, array_diff_key($this->map[$descendantClass]['fieldAliases'], $fieldAliases));
                        }
                    }
                }
            }
        }
        return $fieldAliases;
    }
834290
public function getReverseAssociation($className)
    {
        if (is_array($this->manyMany())) {
            $many_many = array_flip($this->manyMany());
            if (array_key_exists($className, $many_many)) {
                return $many_many[$className];
            }
        }
        if (is_array($this->hasMany())) {
            $has_many = array_flip($this->hasMany());
            if (array_key_exists($className, $has_many)) {
                return $has_many[$className];
            }
        }
        if (is_array($this->hasOne())) {
            $has_one = array_flip($this->hasOne());
            if (array_key_exists($className, $has_one)) {
                return $has_one[$className];
            }
        }

        return false;
    }
492209
public static function get_by_object_classname($classname) {
		$db = Database::Get();
		$ids = $db->getCol('SELECT id FROM object_text WHERE classname=?', [ $classname ]);
		$object_texts = [];
		foreach ($ids as $id) {
			$object_texts[] = self::get_by_id($id);
		}
		return $object_texts;
	}
111598
private function getOperatorFieldName(string $className): string
    {
        $name = preg_replace('~OperatorType$~', '', Utils::getTypeName($className));

        return lcfirst($name);
    }
1116863
public function getFieldType($fieldName)
    {
        return Maybe::fromMaybe(
            Boa::any(),
            $this->getFieldAnnotation($fieldName, static::ANNOTATION_TYPE)
        );
    }
777049
public function getInstance($className)
    {
        switch ($className) {
            case '\\Zepi\\DataSource\\Doctrine\\Manager\\EntityManager':
                if ($this->entityManager === null) {
                    $configurationManager = $this->framework->getInstance('\\Zepi\\Core\\Utils\\Manager\\ConfigurationManager');
                    
                    $params = array(
                        'driver' => $configurationManager->getSetting('doctrine.databaseDriver'),
                        'host' => $configurationManager->getSetting('doctrine.databaseHost'),
                        'dbname' => $configurationManager->getSetting('doctrine.databaseName'),
                        'user' => $configurationManager->getSetting('doctrine.databaseUser'),
                        'password' => $configurationManager->getSetting('doctrine.databasePassword')
                    );
                    
                    $paths = array();
                    foreach ($this->framework->getModuleManager()->getModules() as $module) {
                        $paths[] = $module->getDirectory() . '/src/';
                    }
                    
                    $environment = strtoupper($configurationManager->getSetting('environment'));
                    $isDevMode = false;
                    if ($environment == 'DEV') {
                        $isDevMode = true;
                    }
                      
                    $config = \Doctrine\ORM\Tools\Setup::createAnnotationMetadataConfiguration($paths, $isDevMode);
                    
                    $path = $this->prepareCacheDirectory($environment);
                    $config->setProxyDir($path);
                    
                    if ($environment == 'DEV') {
                        $config->setAutoGenerateProxyClasses(AbstractProxyFactory::AUTOGENERATE_ALWAYS);
                    } else {
                        $config->setAutoGenerateProxyClasses(AbstractProxyFactory::AUTOGENERATE_NEVER);
                    }
                    
                    $doctrineEntityManager = \Doctrine\ORM\EntityManager::create($params, $config);
                    
                    $this->entityManager = new \Zepi\DataSource\Doctrine\Manager\EntityManager($doctrineEntityManager);
                }
                
                return $this->entityManager;
            break;
            
            default: 
                return $this->framework->initiateObject($className);
            break;
        }
    }
8678
public function getInstance($className)
    {
        switch ($className) {
            case '\\Zepi\\Web\\General\\Manager\\AssetManager':
                if ($this->assetManager === null) {
                    $this->assetManager = new $className(
                        $this->getDataObjectBackend('assets.data'),
                        $this->framework->getRootDirectory()
                    );
                    $this->assetManager->initializeAssetManager();
                }
                
                return $this->assetManager;
            break;
            
            case '\\Zepi\\Web\\General\\Manager\\AssetCacheManager':
                if ($this->assetCacheManager === null) {
                    // Get the cache backends
                    $path = $this->framework->getRootDirectory() . '/cache/';
                    $fileObjectBackend = new \Zepi\Turbo\Backend\FileObjectBackend($path . 'cachedFiles.data');
                    $fileBackend = new \Zepi\Turbo\Backend\FileBackend($path);
            
                    // CSS helper
                    $cssHelper = new \Zepi\Web\General\Helper\CssHelper($fileBackend);
            
                    // Load the configuration
                    $configurationManager = $this->framework->getInstance('\\Zepi\\Core\\Utils\\Manager\\ConfigurationManager');
                    $minifyAssets = $configurationManager->getSetting('assets.minifyAssets');
                    $combineAssetGroups = $configurationManager->getSetting('assets.combineAssetGroups');
            
                    $this->assetCacheManager = new $className(
                        $this->framework,
                        $this->getInstance('\\Zepi\\Web\\General\\Manager\\AssetManager'),
                        $fileObjectBackend,
                        $fileBackend,
                        $cssHelper,
                        $minifyAssets,
                        $combineAssetGroups
                    );
                    $this->assetCacheManager->initializeAssetCacheManager();
                }
            
                return $this->assetCacheManager;
            break;
            
            case '\\Zepi\\Web\\General\\Manager\\TemplatesManager':
                if ($this->templatesManager === null) {
                    $this->templatesManager = new $className(
                        $this->framework, 
                        $this->getDataObjectBackend('templates.data')
                    );
                    $this->templatesManager->initializeTemplatesManager();
                    
                    // Execute the register renderer event
                    $runtimeManager = $this->framework->getRuntimeManager();
                    $runtimeManager->executeEvent('\\Zepi\\Web\\General\\Event\\RegisterRenderers');
                }
                
                return $this->templatesManager;
            break;
            
            case '\\Zepi\\Web\\General\\Manager\\MenuManager':
            case '\\Zepi\\Web\\General\\Manager\\MetaInformationManager':
                return $this->framework->initiateObject($className, array(), true);
            break;
            
            default: 
                return $this->framework->initiateObject($className);
            break;
        }
    }
95893
public static function getClassAnnotations($className)
    {
        if (!isset(self::$annotationCache[$className])) {
            $class = new \ReflectionClass($className);
            self::$annotationCache[$className] = self::parseAnnotations($class->getDocComment());
        }

        return self::$annotationCache[$className];
    }