class FieldsRepository

Fields repository allows us to retrieve fields that belong to page versions and keys and have been deleted. We also can find global fields with this repository.

Methods

__construct(DvsField $Field, DvsGlobalField $GlobalField)

Construct a new FieldsRepository

Field
findFieldByKeyAndPageVersion($key, $pageVersionId, $collectionInstanceId)

Find existing page field given key and pageId

Field
findTrashedFieldByKeyAndPageVersion($key, $pageVersionId)

Find existing page field (only if it has been trashed)

DvsGlobalField
findTrashedGlobalFieldByKeyAndLanguage(string $key, integer $languageId)

Find existing global field (only if it has been trashed)

DvsField
findFieldById(integer $id)

Find the field by id

DvsField
findFieldByIdAndScope(integer $fieldId, string $fieldScope)

Find a field by it's id and scope (page or global)

DvsField
findTrashedFieldByIdAndScope(integer $fieldId, string $fieldScope)

Find a field by it's scope and included fields that have been deleted

DvsGlobalField
findFieldByGlobalKeyAndLanguage(string $key, integer $languageId)

Find a field by it's global key and language id

Field
findContentRequestedFieldsList(integer $pageVersionId)

Find all fields where content requested is true for given page version id and builds a list of field keys

Details

at line 32
__construct(DvsField $Field, DvsGlobalField $GlobalField)

Construct a new FieldsRepository

Parameters

DvsField $Field
DvsGlobalField $GlobalField

at line 45
Field findFieldByKeyAndPageVersion($key, $pageVersionId, $collectionInstanceId)

Find existing page field given key and pageId

Parameters

$key
$pageVersionId
$collectionInstanceId

Return Value

Field

at line 61
Field findTrashedFieldByKeyAndPageVersion($key, $pageVersionId)

Find existing page field (only if it has been trashed)

Parameters

$key
$pageVersionId

Return Value

Field

at line 78
DvsGlobalField findTrashedGlobalFieldByKeyAndLanguage(string $key, integer $languageId)

Find existing global field (only if it has been trashed)

Parameters

string $key
integer $languageId

Return Value

DvsGlobalField

at line 93
DvsField findFieldById(integer $id)

Find the field by id

Parameters

integer $id

Return Value

DvsField

at line 105
DvsField findFieldByIdAndScope(integer $fieldId, string $fieldScope)

Find a field by it's id and scope (page or global)

Parameters

integer $fieldId
string $fieldScope

Return Value

DvsField || DvsGlobalField

at line 117
DvsField findTrashedFieldByIdAndScope(integer $fieldId, string $fieldScope)

Find a field by it's scope and included fields that have been deleted

Parameters

integer $fieldId
string $fieldScope

Return Value

DvsField || DvsGlobalField

at line 129
DvsGlobalField findFieldByGlobalKeyAndLanguage(string $key, integer $languageId)

Find a field by it's global key and language id

Parameters

string $key
integer $languageId

Return Value

DvsGlobalField

at line 141
Field findContentRequestedFieldsList(integer $pageVersionId)

Find all fields where content requested is true for given page version id and builds a list of field keys

Parameters

integer $pageVersionId

Return Value

Field