Property | Type | Description | |
---|---|---|---|
$CollectionsRepository | Collections Repository to fiddle with collections | ||
$DvsCollectionSet | DvsCollectionSet | Dvs Collection Set model | |
$DvsField | DvsField | Dvs Field model | |
$DvsGlobalField | DvsGlobalField | Dvs Global Field model | |
$DvsModelField | DvsModelField | Dvs Model Field model | |
$languageId | integer | Language id | |
$pageId | integer | Page id | |
$pageVersionId | integer | Page version id |
Method | Description | |
---|---|---|
__construct ( DvsField $DvsField, DvsGlobalField $DvsGlobalField, DvsCollectionSet $DvsCollectionSet, DvsModelField $DvsModelField, |
Create a new tag manager | |
getInstanceForTag ( array $tag ) : DvsField | DvsCollection | DvsModelField | DvsGlobalField | Find this tag in the database | |
initialize ( integer $pageId, integer $pageVersionId, integer $languageId ) : void | Initializes values for our tag manager |
Method | Description | |
---|---|---|
assertInitialized ( ) : void | Assert that pageId, pageVersionId and languageId are all set | |
createCollectionSet ( array $tag ) : DvsCollectionSet | Create a collection set from this tag | |
createFieldInstance ( array $tag ) : DvsField | Create a new field instance | |
createMissingModelFields ( array $tag, $fields, $mappings ) : void | Ensures that all model fields are created for a model's picks | |
createModelField ( integer $modelId, string $modelType, string $mapping ) : DvsModelField | Creates this model field for us in the database this will also restore an existing soft deleted model field if it finds one. | |
fetchMappingsForModelField ( array $tag ) : array | Finds the mappings for this model type This allows us to know if we have created enough DvsModelField entries in the database | |
fetchModelFields ( integer $modelId, string $modelType, array $mappings, $onlyTrashed = false ) : Collection | Fetch all the model fields | |
filterModelFieldByAttribute ( $modelFields, string $attribute ) : DvsModelField | Filters out the attribute from this model field | |
findField ( array $tag ) : DvsField | Find the field in the database | |
findGlobalField ( array $tag ) : DvsGlobalField | Finds a global field for this tag | |
getInstanceForAttribute ( array $tag ) : DvsModelField | Get the instance for a model attribute in this tag | |
getInstanceForCollection ( array $tag ) : DvsCollectionSet | Get the instance of a collection. This is the CollectionSet with all instances attached | |
getInstanceForCreator ( array $tag ) : StdClass | There is no database instance for creators. | |
getInstanceForField ( $tag ) : DvsField | DvsGlobalField | Find this field in database | |
getInstanceForModel ( array $tag ) : DvsModelField | Get the instance for a model in this tag | |
getInstanceForVariable ( array $tag ) : array | Get the instance for a variable type. We cannot do much with this since we haven't identified what type of variable this is, e.g. model or attribute. | |
restoreFieldInstance ( array $tag ) : DvsField | If there is a field instance that has been deleted, then we restore it cuz we need it again | |
updateInstance ( Eloquent $instance, array $fields ) : void | Updates an instance with the fields given but only if the field values are different than what is already in the database |
public __construct ( DvsField $DvsField, DvsGlobalField $DvsGlobalField, DvsCollectionSet $DvsCollectionSet, DvsModelField $DvsModelField, |
||
$DvsField | DvsField | |
$DvsGlobalField | DvsGlobalField | |
$DvsCollectionSet | DvsCollectionSet | |
$DvsModelField | DvsModelField | |
$CollectionsRepository |
protected assertInitialized ( ) : void | ||
return | void |
protected createCollectionSet ( array $tag ) : DvsCollectionSet | ||
$tag | array | |
return | DvsCollectionSet |
protected createFieldInstance ( array $tag ) : DvsField | ||
$tag | array | |
return | DvsField |
protected createMissingModelFields ( array $tag, $fields, $mappings ) : void | ||
$tag | array | |
return | void |
protected fetchMappingsForModelField ( array $tag ) : array | ||
$tag | array | |
return | array |
protected filterModelFieldByAttribute ( $modelFields, string $attribute ) : DvsModelField | ||
$attribute | string | |
return | DvsModelField |
protected findGlobalField ( array $tag ) : DvsGlobalField | ||
$tag | array | |
return | DvsGlobalField |
protected getInstanceForAttribute ( array $tag ) : DvsModelField | ||
$tag | array | |
return | DvsModelField |
protected getInstanceForCollection ( array $tag ) : DvsCollectionSet | ||
$tag | array | |
return | DvsCollectionSet |
protected getInstanceForCreator ( array $tag ) : StdClass | ||
$tag | array | |
return | StdClass |
protected getInstanceForField ( $tag ) : DvsField | DvsGlobalField | ||
$tag | ||
return | DvsField | DvsGlobalField | | DvsGlobalField |
protected getInstanceForModel ( array $tag ) : DvsModelField | ||
$tag | array | |
return | DvsModelField |
public getInstanceForTag ( array $tag ) : DvsField | DvsCollection | DvsModelField | DvsGlobalField | ||
$tag | array | |
return | DvsField | DvsCollection | DvsModelField | DvsGlobalField | | DvsCollection | DvsModelField | DvsGlobalField |
protected getInstanceForVariable ( array $tag ) : array | ||
$tag | array | |
return | array |
protected restoreFieldInstance ( array $tag ) : DvsField | ||
$tag | array | |
return | DvsField |
protected updateInstance ( Eloquent $instance, array $fields ) : void | ||
$instance | Eloquent | |
$fields | array | |
return | void |
protected CollectionsRepository,Devise\Pages\Collections $CollectionsRepository | ||
return |
protected DvsCollectionSet $DvsCollectionSet | ||
return | DvsCollectionSet |
protected DvsGlobalField $DvsGlobalField | ||
return | DvsGlobalField |
protected DvsModelField $DvsModelField | ||
return | DvsModelField |