PHP Class Neos\Media\Domain\Repository\AssetRepository

Inheritance: extends Neos\Flow\Persistence\Repository
Afficher le fichier Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$assetService Neos\Media\Domain\Service\AssetService
$defaultOrderings array
$entityManager Doctrine\Common\Persistence\ObjectManager ..

Méthodes publiques

Méthode Description
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 )

Méthodes protégées

Méthode Description
addAssetCollectionToQueryConstraints ( Query $query, AssetCollection $assetCollection = null ) : void
addImageVariantFilterClause ( Query $query ) : Neos\Flow\Persistence\QueryInterface

Method Details

add() public méthode

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

addAssetCollectionToQueryConstraints() protected méthode

protected addAssetCollectionToQueryConstraints ( Query $query, AssetCollection $assetCollection = null ) : void
$query Neos\Flow\Persistence\Doctrine\Query
$assetCollection Neos\Media\Domain\Model\AssetCollection
Résultat void

addImageVariantFilterClause() protected méthode

protected addImageVariantFilterClause ( Query $query ) : Neos\Flow\Persistence\QueryInterface
$query Neos\Flow\Persistence\Doctrine\Query
Résultat Neos\Flow\Persistence\QueryInterface

countAll() public méthode

public countAll ( ) : integer
Résultat integer

countByAssetCollection() public méthode

Count assets by asset collection
public countByAssetCollection ( AssetCollection $assetCollection ) : integer
$assetCollection Neos\Media\Domain\Model\AssetCollection
Résultat integer

countByTag() public méthode

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
Résultat integer

countUntagged() public méthode

Counts Assets without any tag
public countUntagged ( AssetCollection $assetCollection = null ) : integer
$assetCollection Neos\Media\Domain\Model\AssetCollection
Résultat integer

findAll() public méthode

public findAll ( AssetCollection $assetCollection = null ) : Neos\Flow\Persistence\QueryResultInterface
$assetCollection Neos\Media\Domain\Model\AssetCollection
Résultat Neos\Flow\Persistence\QueryResultInterface

findAllIterator() public méthode

Find all objects and return an IterableResult
public findAllIterator ( ) : Doctrine\ORM\Internal\Hydration\IterableResult
Résultat Doctrine\ORM\Internal\Hydration\IterableResult

findByAssetCollection() public méthode

public findByAssetCollection ( AssetCollection $assetCollection ) : Neos\Flow\Persistence\QueryResultInterface
$assetCollection Neos\Media\Domain\Model\AssetCollection
Résultat Neos\Flow\Persistence\QueryResultInterface

findBySearchTermOrTags() public méthode

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
Résultat Neos\Flow\Persistence\QueryResultInterface

findByTag() public méthode

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
Résultat Neos\Flow\Persistence\QueryResultInterface

findOneByResourceSha1() public méthode

public findOneByResourceSha1 ( string $sha1 ) : Neos\Media\Domain\Model\AssetInterface | null
$sha1 string
Résultat Neos\Media\Domain\Model\AssetInterface | null

findUntagged() public méthode

Find Assets without any tag
public findUntagged ( AssetCollection $assetCollection = null ) : Neos\Flow\Persistence\QueryResultInterface
$assetCollection Neos\Media\Domain\Model\AssetCollection
Résultat Neos\Flow\Persistence\QueryResultInterface

iterate() public méthode

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
Résultat Generator

remove() public méthode

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
Résultat void

removeWithoutUsageChecks() public méthode

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
Résultat void

update() public méthode

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

Property Details

$assetService protected_oe property

protected AssetService,Neos\Media\Domain\Service $assetService
Résultat Neos\Media\Domain\Service\AssetService

$defaultOrderings protected_oe property

protected array $defaultOrderings
Résultat array

$entityManager protected_oe property

..
protected ObjectManager,Doctrine\Common\Persistence $entityManager
Résultat Doctrine\Common\Persistence\ObjectManager