static function CreateModule($type, ModuleLocation $location)
    {
        $class = self::ModuleClass($type, $location);
        if (!class_exists($class))
        {
            return null;
        }
        return new $class();
    }
static function CreateModule($type, ModuleLocation $location)
    {
        $class = self::ModuleClass($type, $location);
        if (!class_exists($class))
        {
            return null;
        }
        return new $class();
    }
static function CreateModule ( $ type , ModuleLocation $ location ) { $ class = self :: ModuleClass ( $ type , $ location ) ; if ( ! class_exists ( $ class ) ) { return null ; } return new $ class ( ) ; }
Finds the module associated with the given type and returns an instance
@param string $type The module type
@param ModuleLocation $location The location; either backend or frontend
@return ModuleBase
Finds the module associated with the given type and returns an instance