class AssetsHelper implements ProtectedContextAwareInterface (View source)

This is a helper for accessing assets from the media library

Properties

protected AssetRepository $assetRepository
protected TagRepository $tagRepository
protected AssetCollectionRepository $assetCollectionRepository

Methods

QueryResultInterface|null
findByTag(Tag|string|null $tag)

No description

QueryResultInterface|null
findByCollection(AssetCollection|string|null $collection)

No description

QueryResultInterface|null
search(string|null $searchTerm, array $tags = [], AssetCollection|string $collection = null)

No description

bool
allowsCallOfMethod(string $methodName)

No description

Details

QueryResultInterface|null findByTag(Tag|string|null $tag)

No description

Parameters

Tag|string|null $tag

Return Value

QueryResultInterface|null

| null

Exceptions

InvalidQueryException

QueryResultInterface|null findByCollection(AssetCollection|string|null $collection)

No description

Parameters

AssetCollection|string|null $collection

Return Value

QueryResultInterface|null

| null

No description

Parameters

string|null $searchTerm
array $tags
AssetCollection|string $collection

Return Value

QueryResultInterface|null

| null

bool allowsCallOfMethod(string $methodName)

No description

Parameters

string $methodName

Return Value

bool