PHP Class Devise\Pages\Fields\FieldManager

Afficher le fichier Open project: devisephp/cms Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( DvsField $Field, DvsGlobalField $GlobalField, FieldsRepository $FieldsRepository, Framework $Framework ) Construct a new Field Manager
markNoContentRequested ( array $fieldIds ) : boolean Sets a series of fields content requested to false
resetField ( integer $fieldId, $scope ) : DvsField Reset field values
updateField ( integer $fieldId, array $input ) : DvsField Updates the field

Méthodes protégées

Méthode Description
changeFieldScope ( DvsField | DvsGlobalField $field, string $newScope, $fieldInput, $pageInput ) : DvsField | DvsGlobalField Changes the field scope
changeToGlobalField ( array $fieldInput, array $pageInput ) : DvsGlobalField Changes this page field to a global field
changeToPageField ( array $fieldInput, array $pageInput ) : DvsField Changes this global field to a page field
getFieldToUpdate ( integer $fieldId, $fieldInput, $pageInput ) : Field This function will get us our field
newGlobalField ( $languageId, $key, $type, $humanName ) : PageField Create page field given input
newPageField ( $pageVersionId, $key, $type, $humanName ) : PageField Create page field given input
removePristinePageFields ( $key ) : void Removes the pristine page fields for this global field. We only do this when we *first* create the global field

Method Details

__construct() public méthode

Construct a new Field Manager
public __construct ( DvsField $Field, DvsGlobalField $GlobalField, FieldsRepository $FieldsRepository, Framework $Framework )
$Field DvsField
$GlobalField DvsGlobalField
$FieldsRepository FieldsRepository
$Framework Devise\Support\Framework

changeFieldScope() protected méthode

Changes the field scope
protected changeFieldScope ( DvsField | DvsGlobalField $field, string $newScope, $fieldInput, $pageInput ) : DvsField | DvsGlobalField
$field DvsField | DvsGlobalField
$newScope string
Résultat DvsField | DvsGlobalField

changeToGlobalField() protected méthode

Changes this page field to a global field
protected changeToGlobalField ( array $fieldInput, array $pageInput ) : DvsGlobalField
$fieldInput array
$pageInput array
Résultat DvsGlobalField

changeToPageField() protected méthode

Changes this global field to a page field
protected changeToPageField ( array $fieldInput, array $pageInput ) : DvsField
$fieldInput array
$pageInput array
Résultat DvsField

getFieldToUpdate() protected méthode

This function will get us our field
protected getFieldToUpdate ( integer $fieldId, $fieldInput, $pageInput ) : Field
$fieldId integer
Résultat Field

markNoContentRequested() public méthode

Sets a series of fields content requested to false
public markNoContentRequested ( array $fieldIds ) : boolean
$fieldIds array Array of field ids
Résultat boolean

newGlobalField() protected méthode

Create page field given input
protected newGlobalField ( $languageId, $key, $type, $humanName ) : PageField
Résultat PageField

newPageField() protected méthode

Create page field given input
protected newPageField ( $pageVersionId, $key, $type, $humanName ) : PageField
Résultat PageField

removePristinePageFields() protected méthode

Removes the pristine page fields for this global field. We only do this when we *first* create the global field
protected removePristinePageFields ( $key ) : void
Résultat void

resetField() public méthode

Reset field values
public resetField ( integer $fieldId, $scope ) : DvsField
$fieldId integer
Résultat DvsField | \DvsGlobalField

updateField() public méthode

Updates the field
public updateField ( integer $fieldId, array $input ) : DvsField
$fieldId integer
$input array
Résultat DvsField | \DvsGlobaField