original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Marks as "in use" the given view mode.
  
  The given view mode must be registered first using `add()`. If you
  try to switch to an unexisting (unregistered) view mode this method will
  throw and exception.
  
  @param string $slug View mode machine name to switch to
  @return void
  @throws \Cake\Network\Exception\InternalErrorException When switching to an
  unregistered view mode
docstring_tokens: Marks as in use the given view mode .