original_string: protected function setSortBy($sortBy)
      {
          if (!in_array($sortBy, [
              MediaLibrary::SORT_BY_TITLE,
              MediaLibrary::SORT_BY_SIZE,
              MediaLibrary::SORT_BY_MODIFIED
          ])) {
              throw new ApplicationException('Invalid input data');
          }
  
          $this->putSession('media_sort_by', $sortBy);
      }
code: protected function setSortBy($sortBy)
      {
          if (!in_array($sortBy, [
              MediaLibrary::SORT_BY_TITLE,
              MediaLibrary::SORT_BY_SIZE,
              MediaLibrary::SORT_BY_MODIFIED
          ])) {
              throw new ApplicationException('Invalid input data');
          }
  
          $this->putSession('media_sort_by', $sortBy);
      }
code_tokens: protected function setSortBy ( $ sortBy ) { if ( ! in_array ( $ sortBy , [ MediaLibrary :: SORT_BY_TITLE , MediaLibrary :: SORT_BY_SIZE , MediaLibrary :: SORT_BY_MODIFIED ] ) ) { throw new ApplicationException ( 'Invalid input data' ) ; } $ this -> putSession ( 'media_sort_by' , $ sortBy ) ; }
docstring: Sets the user sort column from the session state
  @param string $sortBy
  @return void
docstring_tokens: Sets the user sort column from the session state