public static function shortName($class, $type, $suffix = '')
    {
        $class = str_replace('\\', '/', $class);
        $type = '/' . $type . '/';

        $pos = strrpos($class, $type);
        $pluginName = substr($class, 0, $pos);
        $name = substr($class, $pos + strlen($type));

        if ($suffix) {
            $name = substr($name, 0, -strlen($suffix));
        }

        $nonPluginNamespaces = [
            'Cake',
            str_replace('\\', '/', Configure::read('App.namespace'))
        ];
        if (in_array($pluginName, $nonPluginNamespaces)) {
            return $name;
        }

        return $pluginName . '.' . $name;
    }