class SavedSearch extends Set (View source)

Constants

TYPE_PRIVATE

TYPE_PUBLIC

TYPE_STARRED

TYPE_SAVED_SEARCH

GLOBAL_FILESET_USER_ID

Properties

protected $fileSetFiles from Set
int $fsID from Set
int $uID from Set
string $fsName from Set
int $fsType from Set
$fsSearchRequest from Set
$fsResultColumns from Set

Methods

static 
getGlobal()

Returns an object mapping to the global file set, fsID = 0.

from Set
static Set[]
getMySets(bool|User $u = false)

No description

from Set
static mixed
createAndGetSet(string $fs_name, int $fs_type, int|bool $fs_uid = false)

Creats a new fileset if set doesn't exists.

from Set
static Set
getByID(int $fsID)

Get a file set object by a file set's id.

from Set
static 
__callStatic($name, $arguments)

No description

from Set
static Set
create(string $setName, int $fsOverrideGlobalPermissions, bool|User $u = false, int $type = self::TYPE_PUBLIC)

Adds a File set.

from Set
static array|void
getFilesBySetID(int $fsID)

Static method to return an array of File objects by the set id.

from Set
static array|void
getFilesBySetName(string $fsName, int|bool $uID = false)

Static method to return an array of File objects by the set name.

from Set
static Set
getByName(string $fsName, int|bool $uID = false)

Get a file set object by a file name.

from Set
File[]
getFiles()

Returns an array of File objects from the current set.

from Set
populateFiles()

Get a list of files associated with this set.

from Set
int
getFileSetUserID()

No description

from Set
int
getFileSetType()

No description

from Set
getSavedSearches()

No description

from Set
int
getFileSetID()

No description

from Set
updateFileSetDisplayOrder(array $files)

No description

from Set
int
overrideGlobalPermissions()

No description

from Set
string
getFileSetName()

No description

from Set
string
getFileSetDisplayName(string $format = 'html')

Returns the display name for this file set (localized and escaped accordingly to $format).

from Set
Set
update($setName)

Updates a file set.

from Set
File|null
addFileToSet(int|File|Version $f_id)

Adds the file to the set.

from Set
getSavedSearchRequest()

No description

from Set
getSavedSearchColumns()

No description

from Set
bool
removeFileFromSet(int|File|Version $f_id)

No description

from Set
hasFileID($f_id)

No description

from Set
delete()

No description

from Set
getJSONObject()

No description

from Set
getPermissionResponseClassName() deprecated

No description

from Set
getPermissionObjectKeyCategoryHandle() deprecated

No description

from Set
getPermissionObjectIdentifier() deprecated

No description

from Set
static 
add($name, $searchRequest, $searchColumnsObject)

No description

Details

in Set at line 69
static getGlobal()

Returns an object mapping to the global file set, fsID = 0.

This is really only used for permissions mapping.

in Set at line 82
static Set[] getMySets(bool|User $u = false)

Parameters

bool|User $u

Return Value

Set[]

static mixed createAndGetSet(string $fs_name, int $fs_type, int|bool $fs_uid = false)

Creats a new fileset if set doesn't exists.

If we find a multiple groups with the same properties, we return an array containing each group

Parameters

string $fs_name
int $fs_type
int|bool $fs_uid

Return Value

mixed Dev Note: This will create duplicate sets with the same name if a set exists owned by another user!!!

static Set getByID(int $fsID)

Get a file set object by a file set's id.

Parameters

int $fsID

Return Value

Set

static __callStatic($name, $arguments)

Parameters

$name
$arguments

static Set create(string $setName, int $fsOverrideGlobalPermissions, bool|User $u = false, int $type = self::TYPE_PUBLIC)

Adds a File set.

Parameters

string $setName
int $fsOverrideGlobalPermissions
bool|User $u
int $type

Return Value

Set

static array|void getFilesBySetID(int $fsID)

Static method to return an array of File objects by the set id.

Parameters

int $fsID

Return Value

array|void

static array|void getFilesBySetName(string $fsName, int|bool $uID = false)

Static method to return an array of File objects by the set name.

Parameters

string $fsName
int|bool $uID

Return Value

array|void

static Set getByName(string $fsName, int|bool $uID = false)

Get a file set object by a file name.

Parameters

string $fsName
int|bool $uID

Return Value

Set

File[] getFiles()

Returns an array of File objects from the current set.

Return Value

File[]

private populateFiles()

Get a list of files associated with this set.

Can obsolete this when we get version of ADOdB with one/many support

int getFileSetUserID()

Return Value

int

int getFileSetType()

Return Value

int

getSavedSearches()

int getFileSetID()

Return Value

int

updateFileSetDisplayOrder(array $files)

Parameters

array $files Array of file IDs

int overrideGlobalPermissions()

Return Value

int

string getFileSetName()

Return Value

string

string getFileSetDisplayName(string $format = 'html')

Returns the display name for this file set (localized and escaped accordingly to $format).

Parameters

string $format

Return Value

string

Set update($setName)

Updates a file set.

Parameters

$setName

Return Value

Set

File|null addFileToSet(int|File|Version $f_id)

Adds the file to the set.

Parameters

int|File|Version $f_id

Return Value

File|null returns NULL if the operation failed (for instance because $f_id is invalid), a \Concrete\Core\File\Set\File instance otherwise

getSavedSearchRequest()

getSavedSearchColumns()

bool removeFileFromSet(int|File|Version $f_id)

Parameters

int|File|Version $f_id

Return Value

bool Returns false if the operation failed (for instance because $f_id is invalid), true otherwise

hasFileID($f_id)

Parameters

$f_id

delete()

getJSONObject()

getPermissionResponseClassName() deprecated

deprecated

getPermissionObjectKeyCategoryHandle() deprecated

deprecated

getPermissionObjectIdentifier() deprecated

deprecated

static add($name, $searchRequest, $searchColumnsObject)

Parameters

$name
$searchRequest
$searchColumnsObject