original_string: protected function setViewMode($viewMode)
      {
          if (!in_array($viewMode, [
              self::VIEW_MODE_GRID,
              self::VIEW_MODE_LIST,
              self::VIEW_MODE_TILES
          ])) {
              throw new ApplicationException('Invalid input data');
          }
  
          $this->putSession('view_mode', $viewMode);
      }
code: protected function setViewMode($viewMode)
      {
          if (!in_array($viewMode, [
              self::VIEW_MODE_GRID,
              self::VIEW_MODE_LIST,
              self::VIEW_MODE_TILES
          ])) {
              throw new ApplicationException('Invalid input data');
          }
  
          $this->putSession('view_mode', $viewMode);
      }
code_tokens: protected function setViewMode ( $ viewMode ) { if ( ! in_array ( $ viewMode , [ self :: VIEW_MODE_GRID , self :: VIEW_MODE_LIST , self :: VIEW_MODE_TILES ] ) ) { throw new ApplicationException ( 'Invalid input data' ) ; } $ this -> putSession ( 'view_mode' , $ viewMode ) ; }
docstring: Stores a view mode in the session
  @param string $viewMode
  @return void
docstring_tokens: Stores a view mode in the session