public static function uses($slug)
    {
        if (empty(static::$_modes[$slug])) {
            throw new InternalErrorException(__d('cms', 'Illegal usage of ViewModeRegistry::uses(), view mode "{0}" was not found.', $slug));
        }

        static::$_current = $slug;
    }