src/BoomCMS/Support/Helpers/Asset.php
public static function controller(AssetModel $asset)
    {
        $namespace = 'BoomCMS\Http\Controllers\ViewAsset\\';

        if (!$asset->getExtension()) {
            return;
        }

        $byExtension = $namespace.ucfirst($asset->getExtension());
        if (class_exists($byExtension)) {
            return $byExtension;
        }

        $byType = $namespace.ucfirst($asset->getType());
        if (class_exists($byType)) {
            return $byType;
        }

        return $namespace.'BaseController';
    }
public static function controller(AssetModel $asset)
    {
        $namespace = 'BoomCMS\Http\Controllers\ViewAsset\\';

        if (!$asset->getExtension()) {
            return;
        }

        $byExtension = $namespace.ucfirst($asset->getExtension());
        if (class_exists($byExtension)) {
            return $byExtension;
        }

        $byType = $namespace.ucfirst($asset->getType());
        if (class_exists($byType)) {
            return $byType;
        }

        return $namespace.'BaseController';
    }
public static function controller ( AssetModel $ asset ) { $ namespace = 'BoomCMS\Http\Controllers\ViewAsset\\' ; if ( ! $ asset -> getExtension ( ) ) { return ; } $ byExtension = $ namespace . ucfirst ( $ asset -> getExtension ( ) ) ; if ( class_exists ( $ byExtension ) ) { return $ byExtension ; } $ byType = $ namespace . ucfirst ( $ asset -> getType ( ) ) ; if ( class_exists ( $ byType ) ) { return $ byType ; } return $ namespace . 'BaseController' ; }
Return the controller to be used to display an asset.

@param Asset $asset

@return string
Return the controller to be used to display an asset .