protected function setFilter($filter)
    {
        if (!in_array($filter, [
            self::FILTER_EVERYTHING,
            MediaLibraryItem::FILE_TYPE_IMAGE,
            MediaLibraryItem::FILE_TYPE_AUDIO,
            MediaLibraryItem::FILE_TYPE_DOCUMENT,
            MediaLibraryItem::FILE_TYPE_VIDEO
        ])) {
            throw new ApplicationException('Invalid input data');
        }

        $this->putSession('media_filter', $filter);
    }
protected function setFilter($filter)
    {
        if (!in_array($filter, [
            self::FILTER_EVERYTHING,
            MediaLibraryItem::FILE_TYPE_IMAGE,
            MediaLibraryItem::FILE_TYPE_AUDIO,
            MediaLibraryItem::FILE_TYPE_DOCUMENT,
            MediaLibraryItem::FILE_TYPE_VIDEO
        ])) {
            throw new ApplicationException('Invalid input data');
        }

        $this->putSession('media_filter', $filter);
    }
protected function setFilter ( $ filter ) { if ( ! in_array ( $ filter , [ self :: FILTER_EVERYTHING , MediaLibraryItem :: FILE_TYPE_IMAGE , MediaLibraryItem :: FILE_TYPE_AUDIO , MediaLibraryItem :: FILE_TYPE_DOCUMENT , MediaLibraryItem :: FILE_TYPE_VIDEO ] ) ) { throw new ApplicationException ( 'Invalid input data' ) ; } $ this -> putSession ( 'media_filter' , $ filter ) ; }
Sets the user filter from the session state
@param string $filter
@return void
Sets the user filter from the session state