public static function niceTitle($name)
    {
        if (empty($name)) {
            return '';
        }

        $gateway = null;

        try {
            $factory = new GatewayFactory();
            $gateway = $factory->create($name);
        } catch (\Exception $e) {
            /** do nothing */
        }

        $title = _t(
            'Gateway.' . $name,
            $gateway ? $gateway->getName() : $name
        );

        return ($title) ? $title : $gateway->getName();
    }
public static function niceTitle($name)
    {
        if (empty($name)) {
            return '';
        }

        $gateway = null;

        try {
            $factory = new GatewayFactory();
            $gateway = $factory->create($name);
        } catch (\Exception $e) {
            /** do nothing */
        }

        $title = _t(
            'Gateway.' . $name,
            $gateway ? $gateway->getName() : $name
        );

        return ($title) ? $title : $gateway->getName();
    }
public static function niceTitle ( $ name ) { if ( empty ( $ name ) ) { return '' ; } $ gateway = null ; try { $ factory = new GatewayFactory ( ) ; $ gateway = $ factory -> create ( $ name ) ; } catch ( \ Exception $ e ) { /** do nothing */ } $ title = _t ( 'Gateway.' . $ name , $ gateway ? $ gateway -> getName ( ) : $ name ) ; return ( $ title ) ? $ title : $ gateway -> getName ( ) ; }
Get a locale aware title for the given gateway.

@param string $name gateway short name

@return string nice title for the gateway. Uses translations, if available
Get a locale aware title for the given gateway .