PHP Класс Neos\Media\Domain\Repository\AssetRepository

Наследование: extends Neos\Flow\Persistence\Repository
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$assetService Neos\Media\Domain\Service\AssetService
$defaultOrderings array
$entityManager Doctrine\Common\Persistence\ObjectManager ..

Открытые методы

Метод Описание
add ( Neos\Media\Domain\Model\AssetInterface $object )
countAll ( ) : integer
countByAssetCollection ( AssetCollection $assetCollection ) : integer Count assets by asset collection
countByTag ( Tag $tag, AssetCollection $assetCollection = null ) : integer Counts Assets with the given Tag assigned
countUntagged ( AssetCollection $assetCollection = null ) : integer Counts Assets without any tag
findAll ( AssetCollection $assetCollection = null ) : Neos\Flow\Persistence\QueryResultInterface
findAllIterator ( ) : Doctrine\ORM\Internal\Hydration\IterableResult Find all objects and return an IterableResult
findByAssetCollection ( AssetCollection $assetCollection ) : Neos\Flow\Persistence\QueryResultInterface
findBySearchTermOrTags ( string $searchTerm, array $tags = [], AssetCollection $assetCollection = null ) : Neos\Flow\Persistence\QueryResultInterface Find assets by title or given tags
findByTag ( Tag $tag, AssetCollection $assetCollection = null ) : Neos\Flow\Persistence\QueryResultInterface Find Assets with the given Tag assigned
findOneByResourceSha1 ( string $sha1 ) : Neos\Media\Domain\Model\AssetInterface | null
findUntagged ( AssetCollection $assetCollection = null ) : Neos\Flow\Persistence\QueryResultInterface Find Assets without any tag
iterate ( Doctrine\ORM\Internal\Hydration\IterableResult $iterator, callable $callback = null ) : Generator Iterate over an IterableResult and return a Generator
remove ( Neos\Media\Domain\Model\AssetInterface $object ) : void Remove an asset while first validating if the object can be removed or if removal is blocked because the asset is still in use.
removeWithoutUsageChecks ( Neos\Media\Domain\Model\AssetInterface $object ) : void 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.
update ( Neos\Media\Domain\Model\AssetInterface $object )

Защищенные методы

Метод Описание
addAssetCollectionToQueryConstraints ( Query $query, AssetCollection $assetCollection = null ) : void
addImageVariantFilterClause ( Query $query ) : Neos\Flow\Persistence\QueryInterface

Описание методов

add() публичный Метод

public add ( Neos\Media\Domain\Model\AssetInterface $object )
$object Neos\Media\Domain\Model\AssetInterface

addAssetCollectionToQueryConstraints() защищенный Метод

protected addAssetCollectionToQueryConstraints ( Query $query, AssetCollection $assetCollection = null ) : void
$query Neos\Flow\Persistence\Doctrine\Query
$assetCollection Neos\Media\Domain\Model\AssetCollection
Результат void

addImageVariantFilterClause() защищенный Метод

protected addImageVariantFilterClause ( Query $query ) : Neos\Flow\Persistence\QueryInterface
$query Neos\Flow\Persistence\Doctrine\Query
Результат Neos\Flow\Persistence\QueryInterface

countAll() публичный Метод

public countAll ( ) : integer
Результат integer

countByAssetCollection() публичный Метод

Count assets by asset collection
public countByAssetCollection ( AssetCollection $assetCollection ) : integer
$assetCollection Neos\Media\Domain\Model\AssetCollection
Результат integer

countByTag() публичный Метод

Counts Assets with the given Tag assigned
public countByTag ( Tag $tag, AssetCollection $assetCollection = null ) : integer
$tag Neos\Media\Domain\Model\Tag
$assetCollection Neos\Media\Domain\Model\AssetCollection
Результат integer

countUntagged() публичный Метод

Counts Assets without any tag
public countUntagged ( AssetCollection $assetCollection = null ) : integer
$assetCollection Neos\Media\Domain\Model\AssetCollection
Результат integer

findAll() публичный Метод

public findAll ( AssetCollection $assetCollection = null ) : Neos\Flow\Persistence\QueryResultInterface
$assetCollection Neos\Media\Domain\Model\AssetCollection
Результат Neos\Flow\Persistence\QueryResultInterface

findAllIterator() публичный Метод

Find all objects and return an IterableResult
public findAllIterator ( ) : Doctrine\ORM\Internal\Hydration\IterableResult
Результат Doctrine\ORM\Internal\Hydration\IterableResult

findByAssetCollection() публичный Метод

public findByAssetCollection ( AssetCollection $assetCollection ) : Neos\Flow\Persistence\QueryResultInterface
$assetCollection Neos\Media\Domain\Model\AssetCollection
Результат Neos\Flow\Persistence\QueryResultInterface

findBySearchTermOrTags() публичный Метод

Find assets by title or given tags
public findBySearchTermOrTags ( string $searchTerm, array $tags = [], AssetCollection $assetCollection = null ) : Neos\Flow\Persistence\QueryResultInterface
$searchTerm string
$tags array
$assetCollection Neos\Media\Domain\Model\AssetCollection
Результат Neos\Flow\Persistence\QueryResultInterface

findByTag() публичный Метод

Find Assets with the given Tag assigned
public findByTag ( Tag $tag, AssetCollection $assetCollection = null ) : Neos\Flow\Persistence\QueryResultInterface
$tag Neos\Media\Domain\Model\Tag
$assetCollection Neos\Media\Domain\Model\AssetCollection
Результат Neos\Flow\Persistence\QueryResultInterface

findOneByResourceSha1() публичный Метод

public findOneByResourceSha1 ( string $sha1 ) : Neos\Media\Domain\Model\AssetInterface | null
$sha1 string
Результат Neos\Media\Domain\Model\AssetInterface | null

findUntagged() публичный Метод

Find Assets without any tag
public findUntagged ( AssetCollection $assetCollection = null ) : Neos\Flow\Persistence\QueryResultInterface
$assetCollection Neos\Media\Domain\Model\AssetCollection
Результат Neos\Flow\Persistence\QueryResultInterface

iterate() публичный Метод

This method is useful for batch processing huge result set as it clears the object manager and detaches the current object on each iteration.
public iterate ( Doctrine\ORM\Internal\Hydration\IterableResult $iterator, callable $callback = null ) : Generator
$iterator Doctrine\ORM\Internal\Hydration\IterableResult
$callback callable
Результат Generator

remove() публичный Метод

Remove an asset while first validating if the object can be removed or if removal is blocked because the asset is still in use.
public remove ( Neos\Media\Domain\Model\AssetInterface $object ) : void
$object Neos\Media\Domain\Model\AssetInterface
Результат void

removeWithoutUsageChecks() публичный Метод

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.
public removeWithoutUsageChecks ( Neos\Media\Domain\Model\AssetInterface $object ) : void
$object Neos\Media\Domain\Model\AssetInterface
Результат void

update() публичный Метод

public update ( Neos\Media\Domain\Model\AssetInterface $object )
$object Neos\Media\Domain\Model\AssetInterface

Описание свойств

$assetService защищенное свойство

protected AssetService,Neos\Media\Domain\Service $assetService
Результат Neos\Media\Domain\Service\AssetService

$defaultOrderings защищенное свойство

protected array $defaultOrderings
Результат array

$entityManager защищенное свойство

..
protected ObjectManager,Doctrine\Common\Persistence $entityManager
Результат Doctrine\Common\Persistence\ObjectManager