BaseModule::getInheritedModule PHP Method

getInheritedModule() protected method

Returns the module parent class if it is also an installed module.
protected getInheritedModule ( ) : mixed
return mixed
    protected function getInheritedModule()
    {
        $r = new ReflectionClass($this);
        $parent = $r->getParentClass();
        if ($id = Yii::app()->moduleAPI->moduleIDFromClass('\\' . $parent->name)) {
            return Yii::app()->getModule($id);
        }
    }