DocumentRepository
class DocumentRepository extends AssetRepository (View source)
A repository for Documents
Properties
protected EntityManagerInterface | $entityManager | Doctrine's Entity Manager. |
from AssetRepository |
protected array | $defaultOrderings | from AssetRepository | |
protected AssetService | $assetService | from AssetRepository | |
protected ReflectionService | $reflectionService | from AssetRepository |
Methods
Find assets by title or given tags
Find Assets with the given Tag assigned
Counts Assets with the given Tag assigned
No description
Adds conditions filtering any implementation of AssetVariantInterface
Returns a DQL clause filtering any implementation of AssetVariantInterface
Iterate over an IterableResult and return a Generator
Remove an asset while first validating if the object can be removed or if removal is blocked because the asset is still in use.
Remove the asset even if it is still in use. Use with care, it is probably better to first make sure the asset is not used anymore and then use the remove() method for removal.
Details
QueryResultInterface
findBySearchTermOrTags(string $searchTerm, array $tags = [], AssetCollection $assetCollection = null)
Find assets by title or given tags
QueryResultInterface
findByTag(Tag $tag, AssetCollection $assetCollection = null)
Find Assets with the given Tag assigned
int
countByTag(Tag $tag, AssetCollection $assetCollection = null)
Counts Assets with the given Tag assigned
QueryResultInterface
findAll(AssetCollection $assetCollection = null)
No description
int
countAll()
No description
QueryResultInterface
findUntagged(AssetCollection $assetCollection = null)
Find Assets without any tag
int
countUntagged(AssetCollection $assetCollection = null)
Counts Assets without any tag
QueryResultInterface
findByAssetCollection(AssetCollection $assetCollection)
No description
int
countByAssetCollection(AssetCollection $assetCollection)
Count assets by asset collection
protected void
addAssetCollectionToQueryConstraints(QueryInterface $query, AssetCollection $assetCollection = null)
No description
protected void
addAssetVariantToQueryConstraints(QueryInterface $query)
Adds conditions filtering any implementation of AssetVariantInterface
protected string
getAssetVariantFilterClauseForDql(string $alias)
Returns a DQL clause filtering any implementation of AssetVariantInterface
AssetInterface|null
findOneByResourceSha1(string $sha1)
No description
Generator|null
iterate(IterableResult $iterator, callable $callback = null)
Iterate over an IterableResult and return a Generator
This method is useful for batch processing huge result set as it clears the object manager and detaches the current object on each iteration.
IterableResult
findAllIterator()
Find all objects and return an IterableResult
void
remove(AssetInterface $object)
Remove an asset while first validating if the object can be removed or if removal is blocked because the asset is still in use.
void
removeWithoutUsageChecks(AssetInterface $object)
Remove the asset even if it is still in use. Use with care, it is probably better to first make sure the asset is not used anymore and then use the remove() method for removal.
void
add(AssetInterface $object)
No description
void
update(AssetInterface $object)
No description