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);
    }
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);
    }
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 ) ; }
Sets the user sort column from the session state
@param string $sortBy
@return void
Sets the user sort column from the session state