public static function getBlockTypeMappedClass($btHandle, $pkgHandle = false)
    {
        $app = Application::getFacadeApplication();
        $txt = $app->make('helper/text');

        $pkgHandle = (string) $pkgHandle;
        $locator = $app->make(FileLocator::class);
        if ($pkgHandle !== '') {
            $locator->addLocation(new FileLocator\PackageLocation($pkgHandle));
        }
        $r = $locator->getRecord(DIRNAME_BLOCKS . '/' . $btHandle . '/' . FILENAME_CONTROLLER);
        $overriddenPackageHandle = (string) $r->getPackageHandle();
        if ($overriddenPackageHandle !== '') {
            $pkgHandle = $overriddenPackageHandle;
        }

        $prefix = $r->isOverride() ? true : $pkgHandle;
        $class = core_class('Block\\' . $txt->camelcase($btHandle) . '\\Controller', $prefix);

        return class_exists($class) ? $class : null;
    }