CollectionsRepository
class CollectionsRepository
Retreives collection instances and sets and fields for us.
This class is used in many places to retreieve collection data from the database.
Methods
Construct a new repository with all the dependencies
This is used by the /admin/pages/{pageVersionId}/collections/{collectionSetId}/instances slug
When we only have the pageVersionId we can use this function as a proxy to findCollectionsForPageVersion
Get the list of collections for this page
Get the instances + fields for this collection set / page_version combo
Details
at line 56
__construct(DvsCollectionInstance $CollectionInstance, DvsCollectionSet $CollectionSet, DvsField $Field, DvsPageVersion $PageVersion, CollectionFieldsFactory $CollectionFieldsFactory)
Construct a new repository with all the dependencies
at line 72
EloquentCollection[CollectionInstance]
getInstances(int $pageVersionId, int $collectionSetId)
This is used by the /admin/pages/{pageVersionId}/collections/{collectionSetId}/instances slug
at line 89
array
findCollectionsForPageVersionId(int $pageVersionId)
When we only have the pageVersionId we can use this function as a proxy to findCollectionsForPageVersion
at line 100
array($collectionName
findCollectionsForPageVersion(DvsPageVersion $pageVersion)
Get the list of collections for this page
at line 133
EloquentCollection[CollectionInstance]
findCollectionInstancesForCollectionSetIdAndPageVersionId(int $collectionSetId, int $pageVersionId)
Get the instances + fields for this collection set / page_version combo