Method | Description | |
---|---|---|
__construct ( DvsCollectionInstance $CollectionInstance, DvsCollectionSet $CollectionSet, DvsField $Field, DvsPageVersion $PageVersion, |
Construct a new repository with all the dependencies | |
findCollectionInstancesForCollectionSetIdAndPageVersionId ( integer $collectionSetId, integer $pageVersionId ) : EloquentCollection[CollectionInstance] | Get the instances + fields for this collection set / page_version combo | |
findCollectionsForPageVersion ( DvsPageVersion $pageVersion ) : array($collectionName | Get the list of collections for this page | |
findCollectionsForPageVersionId ( integer $pageVersionId ) : array | When we only have the pageVersionId we can use this function as a proxy to findCollectionsForPageVersion | |
getInstances ( integer $pageVersionId, integer $collectionSetId ) : EloquentCollection[CollectionInstance] | This is used by the /admin/pages/{pageVersionId}/collections/{collectionSetId}/instances slug | |
syncFieldsForInstances ( Eloquent\Collection $instances, array $collectionFields, $pageVersionId ) : Eloquent\Collection | Sync fields for instances |
Method | Description | |
---|---|---|
createFieldsForInstance ( [type] $instance, $collectionFields, [type] $pageVersionId ) : [type] | Creates a field for this instance | |
createMissingFieldsForInstances ( Eloquent\Collection $instances, array $collectionFields, $pageVersionId ) : Eloquent\Collection | Creates any missing fields that may have been added later. | |
findMissingFieldsForInstance ( DvsCollectionInstance $instance, array $collectionFields ) : array | Finds missing fields for an instance |
public __construct ( DvsCollectionInstance $CollectionInstance, DvsCollectionSet $CollectionSet, DvsField $Field, DvsPageVersion $PageVersion, |
||
$CollectionInstance | DvsCollectionInstance | |
$CollectionSet | DvsCollectionSet | |
$Field | DvsField | |
$PageVersion | DvsPageVersion | |
$CollectionFieldsFactory |
protected createFieldsForInstance ( [type] $instance, $collectionFields, [type] $pageVersionId ) : [type] | ||
$instance | [type] | |
$pageVersionId | [type] | |
return | [type] |
protected createMissingFieldsForInstances ( Eloquent\Collection $instances, array $collectionFields, $pageVersionId ) : Eloquent\Collection | ||
$instances | Eloquent\Collection | |
$collectionFields | array | |
return | Eloquent\Collection |
public findCollectionInstancesForCollectionSetIdAndPageVersionId ( integer $collectionSetId, integer $pageVersionId ) : EloquentCollection[CollectionInstance] | ||
$collectionSetId | integer | |
$pageVersionId | integer | |
return | EloquentCollection[CollectionInstance] |
public findCollectionsForPageVersion ( DvsPageVersion $pageVersion ) : array($collectionName | ||
$pageVersion | DvsPageVersion | |
return | array($collectionName |
public findCollectionsForPageVersionId ( integer $pageVersionId ) : array | ||
$pageVersionId | integer | |
return | array |
protected findMissingFieldsForInstance ( DvsCollectionInstance $instance, array $collectionFields ) : array | ||
$instance | DvsCollectionInstance | |
$collectionFields | array | |
return | array |
public getInstances ( integer $pageVersionId, integer $collectionSetId ) : EloquentCollection[CollectionInstance] | ||
$pageVersionId | integer | |
$collectionSetId | integer | |
return | EloquentCollection[CollectionInstance] |
public syncFieldsForInstances ( Eloquent\Collection $instances, array $collectionFields, $pageVersionId ) : Eloquent\Collection | ||
$instances | Eloquent\Collection | |
$collectionFields | array | |
return | Eloquent\Collection |