Returns parent of this subplugin type.

@param string $type
@return string parent component or null
335465
public static function get_subtype_parent($type) {
        self::init();

        if (isset(self::$parents[$type])) {
            return self::$parents[$type];
        }

        return null;
    }
326707
public function type($type = null)
    {
        if (!func_num_args()) {
            return $this->_type;
        }
        $this->_type = $type;
        return $this;
    }
739070
public function getHasChildren( $type = null )
	{
		if ( is_null( $this->domNode ) ) return false;
		$hasAnyChildren = $this->domNode->hasChildNodes();
		if ( ! $hasAnyChildren || is_null( $type ) ) return $hasAnyChildren;

		$clone = $this->CloneInstance();
		return $clone->MoveToChild( $type );
	}
91273
public static function getTypeName($type)
    {
        return isset(self::$names[$type])
            ? self::$names[$type]
            : null;
    }
432154
public function getAdapter($type)
    {
        $returnValue = null;

        
		foreach($this->adapters as $adapter){
			if($adapter instanceof $type){
				$returnValue = $adapter;
				break;
			}
		}
        

        return $returnValue;
    }
924726
public function getSubIfd($type)
    {
        if (isset($this->sub[$type])) {
            return $this->sub[$type];
        } else {
            return null;
        }
    }
673201
public static function get_subplugins($component) {
        self::init();

        if (isset(self::$subplugins[$component])) {
            return self::$subplugins[$component];
        }

        return null;
    }
180965
public static function queryByTypeParent( $parentId, $parentType, $type ) {

		$tableName = static::tableName();

		return self::queryWithModel()->where( "$tableName.parentId=:pid AND $tableName.parentType=:ptype AND $tableName.type=:type", [ ':pid' => $parentId, ':ptype' => $parentType, ':type' => $type ] );
	}
320268
public function getParent()
    {
        if ($this->isRoot()) {
            return null;
        }

        return substr($this->subject->getFullPath(), 0, strrpos($this->subject->getFullPath(), '/'));
    }
71213
public function getNodeVersion($type)
    {
        if ($type == 'public') {
            return $this->publicNodeVersion;
        }

        $nodeVersions = $this->getNodeVersions();

        $max = count($nodeVersions);
        for ($i = $max - 1; $i >= 0; --$i) {
            /* @var NodeVersion $nodeVersion */
            $nodeVersion = $nodeVersions[$i];

            if ($type == $nodeVersion->getType()) {
                return $nodeVersion;
            }
        }

        return null;
    }
1259239
public function getParent()
    {
        if (\is_string($this->parent)) {
            $parent = TypeCollection::getInstance()->getTypeByName($this->parent);
            \assert($parent instanceof ObjectType);

            return $parent;
        }

        return $this->parent;
    }
842223
public static function resolve_plugininfo_class($type) {
        $plugintypes = core_component::get_plugin_types();
        if (!isset($plugintypes[$type])) {
            return '\core\plugininfo\orphaned';
        }

        $parent = core_component::get_subtype_parent($type);

        if ($parent) {
            $class = '\\'.$parent.'\plugininfo\\' . $type;
            if (class_exists($class)) {
                $plugintypeclass = $class;
            } else {
                if ($dir = core_component::get_component_directory($parent)) {
                    // BC only - use namespace instead!
                    if (file_exists("$dir/adminlib.php")) {
                        global $CFG;
                        include_once("$dir/adminlib.php");
                    }
                    if (class_exists('plugininfo_' . $type)) {
                        $plugintypeclass = 'plugininfo_' . $type;
                        debugging('Class "'.$plugintypeclass.'" is deprecated, migrate to "'.$class.'"', DEBUG_DEVELOPER);
                    } else {
                        debugging('Subplugin type "'.$type.'" should define class "'.$class.'"', DEBUG_DEVELOPER);
                        $plugintypeclass = '\core\plugininfo\general';
                    }
                } else {
                    $plugintypeclass = '\core\plugininfo\general';
                }
            }
        } else {
            $class = '\core\plugininfo\\' . $type;
            if (class_exists($class)) {
                $plugintypeclass = $class;
            } else {
                debugging('All standard types including "'.$type.'" should have plugininfo class!', DEBUG_DEVELOPER);
                $plugintypeclass = '\core\plugininfo\general';
            }
        }

        if (!in_array('core\plugininfo\base', class_parents($plugintypeclass))) {
            throw new coding_exception('Class ' . $plugintypeclass . ' must extend \core\plugininfo\base');
        }

        return $plugintypeclass;
    }
484502
protected function getCustomType($type)
    {
        $root = $this;
        while ($cur = $root->getParent()) {
            $root = $cur;
        }
        $customTypes = $root->getSchema()->getCustomTypes();
        $type = ltrim($type, '&');

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

        throw new Exception("Unable to resolve '$type' to a custom type-definition.");
    }
431182
public function parent($parent = null)
    {
        if ($parent === null) {
            return $this->_parent;
        }
        $this->_parent = $parent;

        return $this;
    }
345210
public function getFromGateway($type) {
        $mapper = $this->config->getCcTypesMapper();
        $type   = strtolower($type);

        if( array_key_exists($type, $mapper) ) {
            return $mapper[$type];
        }

        return 'OT';
    }
116780
public function getTypeClass($type)
    {
        if (isset($this->types[$type])) {
            return $this->types[$type];
        }

        if (\class_exists($type)) {
            return $type;
        }

        return null;
    }
338958
public function getByParent( $parentId, $parentType, $config = [] ) {

		$modelClass	= static::$modelClass;

		return $modelClass::findByParent( $parentId, $parentType, $config );
	}