Get the name of a generic file type.

@param int $type Generic category type (one of the \Concrete\Core\File\Type\Type::T_... constants)

@return string|null Returns null if the type is not recognized, its translated display name otherwise
767435
public static function getGenericTypeText($type)
    {
        switch ($type) {
            case static::T_IMAGE:
                return t('Image');
                break;
            case static::T_VIDEO:
                return t('Video');
                break;
            case static::T_TEXT:
                return t('Text');
                break;
            case static::T_AUDIO:
                return t('Audio');
                break;
            case static::T_DOCUMENT:
                return t('Document');
                break;
            case static::T_APPLICATION:
                return t('Application');
                break;
            case static::T_UNKNOWN:
                return t('File');
                break;

        }
    }
1118224
public function getHandlerForType($type)
    {
        foreach ($this->handlers as $handler) {
            if ($handler->getType() == $type) {
                return $handler;
            }
        }

        return new FileHandler();
    }
139027
public function get_unknown_file_types($types) {
        $unknown = [];

        foreach ($this->normalize_file_types($types) as $type) {
            if ($type === '*') {
                // Any file is considered as a known type.
                continue;
            } else if ($type === '.xxx') {
                $unknown[$type] = true;
            } else if ($this->is_filetype_group($type)) {
                // The type is a group that exists.
                continue;
            } else if ($this->looks_like_mimetype($type)) {
                // If there's no extension associated with that mimetype, we consider it unknown.
                if (empty(file_get_typegroup('extension', [$type]))) {
                    $unknown[$type] = true;
                }
            } else {
                $coretypes = core_filetypes::get_types();
                $typecleaned = str_replace(".", "", $type);
                if (empty($coretypes[$typecleaned])) {
                    // If there's no extension, it doesn't exist.
                    $unknown[$type] = true;
                }
            }
        }

        return array_keys($unknown);
    }
363167
public static function getExtensionByType($type)
    {
        return empty($foundExtensions = array_keys(self::$_contentTypes, $type)) ? null : $foundExtensions[0];
    }
927342
public function getClassName(string $type): string
    {
        assert(isset($this->classes[$type]));
        return $this->classes[$type];
    }
711835
protected function getTypeForString($type)
    {
        switch ($type) {
            case 'string':
                return DataTypes::STRING_TYPE;
            case 'number':
                return DataTypes::NUMBER_TYPE;
            case 'date':
            case 'datetime':
                return DataTypes::DATETIME_TYPE;
            case 'boolean':
                return DataTypes::BOOLEAN_TYPE;
            case 'tags':
                return DataTypes::TAGS_TYPE;
            case 'auto-complete':
                return DataTypes::AUTO_COMPLETE_TYPE;
            default:
                return DataTypes::UNDEFINED_TYPE;
        }
    }
988110
protected static function getClassName($type)
    {
        if (in_array($type, array_keys(self::$elements))) {
            $type = self::$elements[$type];
        }

        if (!class_exists($type)) {
            throw new InvalidArgumentException(
                "Input class '{$type}' does not exists."
            );
        }

        if (! is_subclass_of($type, ElementInterface::class)) {
            throw new InvalidArgumentException(
                "The class '{$type}' does not implement the " .
                "Slick\\Form\\ElementInterface interface."
            );
        }

        return $type;
    }
944236
public function getTypeName($type)
    {
        $allowedTypes = $this->getAllowedTypes();

        if ($type && isset($allowedTypes[$type])) {
            return $allowedTypes[$type];
        }

        return t("None"); // @todo
    }
240495
private function getFromMemory($type)
    {
        if (isset($this->loaded[$type])) {
            return $this->loaded[$type];
        }
        return null;
    }
1148264
public static function getCodeByType($type)
    {
        if (isset(self::$typeList[$type])) {
            return self::$typeList[$type];
        } else {
            return false;
        }
    }
1004720
public static function getArrayType(string $type): ?string
    {
        if (substr($type, -2) !== '[]' || strlen($type) === 2) {
            return null;
        }

        return substr($type, 0, -2);
    }
212748
public function get($type, $file = null)
    {
        if (!isset($this->paths[$type])) {
            $method = 'get'.Utils::camelize($type).'Dir';

            if (!method_exists($this, $method)) {
                return null;
            }

            $this->set($type, $this->$method());
        }

        $path = $this->paths[$type];
        if ($file) {
            if ($path instanceof pathmanager\FallbackInterface) {
                $path = $path->resolve($file);
            } else {
                $path .= '/' . ltrim($file, '/');
            }
        }

        return $path;
    }
250460
private function getTypeSuffix($type)
    {
        self::$TYP_MAPPING = array_merge(self::$TYP_COMPLEX_MAPPING, self::$TYP_SIMPLE_MAPPING);

        if ($type == '') {
            return '';
        }

        if (!isset(self::$TYP_MAPPING[$this->type])) {
            return '';
        }

        return self::$TYP_MAPPING[$this->type];
    }
970951
protected function getClassNameForType($type)
    {
        if (!empty($this->rootNamespace) && strstr($type, $this->rootNamespace)) {
            $type = $this->stripNamespace($this->rootNamespace, $type);
        }
        if (!empty($this->rootNamespace)) {
            return sprintf('%s\\%s', $this->rootNamespace, $type);
        }
        return $type;
    }
1069805
public function getRegisteredFiles($type = null)
	{
		if (null === $type)
			return $this->registered_files;
		
		if (isset($this->registered_files[$type]))
			return $this->registered_files[$type];

		return array();
	}
698460
public function get($type)
    {
        $ret = null;
        if ('image' == $type) {
            if (isset($this->metasProp['og:image'])) {
                $ret = $this->metasProp['og:image'];
            } elseif ($this->getParameter('nyroDev_utility.share.image')) {
                $ret = $this->getParameter('nyroDev_utility.share.image');
            }
        } else {
            if (isset($this->metas[$type])) {
                $ret = $this->metas[$type];
            } elseif ($this->getParameter('nyroDev_utility.share.'.$type)) {
                $ret = $this->getParameter('nyroDev_utility.share.'.$type);
            }
        }

        return preg_replace('/\s\s+/', ' ', $this->trans($ret));
    }
1177067
protected function getInheritanceTypeString($type)
    {
        if ( ! isset(static::$inheritanceTypeMap[$type])) {
            throw new \InvalidArgumentException(sprintf('Invalid provided InheritanceType: %s', $type));
        }

        return static::$inheritanceTypeMap[$type];
    }