Devise
Class

Devise\Pages\Fields\FieldsRepository

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

Details

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

Construct a new FieldsRepository

Parameters

DvsField $Field
DvsGlobalField $GlobalField

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

Find existing page field given key and pageId

Parameters

$key
$pageVersionId
$collectionInstanceId

Return Value

Field

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

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

Parameters

$key
$pageVersionId

Return Value

Field

at line 78
public 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
public DvsField findFieldById(integer $id)

Find the field by id

Parameters

integer $id

Return Value

DvsField

at line 105
public 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
public 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
public 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