PHP Class Neos\Media\Domain\Repository\ThumbnailRepository

Note that this repository is not part of the public API. Use the asset's getThumbnail() method instead.
Inheritance: extends Neos\Flow\Persistence\Repository
Show file Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Property Type Description
$entityManager Doctrine\Common\Persistence\ObjectManager

Public Methods

Method Description
countUngenerated ( ) : integer Count ungenerated objects
findAllIterator ( string $configurationHash = null ) : Doctrine\ORM\Internal\Hydration\IterableResult Find all objects and return an IterableResult
findOneByAssetAndThumbnailConfiguration ( Neos\Media\Domain\Model\AssetInterface $asset, ThumbnailConfiguration $configuration ) : Thumbnail Returns a thumbnail of the given asset with the specified dimensions.
findUngeneratedIterator ( ) : Doctrine\ORM\Internal\Hydration\IterableResult Find ungenerated objects and return an IterableResult
iterate ( Doctrine\ORM\Internal\Hydration\IterableResult $iterator, callable $callback = null ) : Generator Iterate over an IterableResult and return a Generator

Method Details

countUngenerated() public method

Count ungenerated objects
public countUngenerated ( ) : integer
return integer

findAllIterator() public method

Find all objects and return an IterableResult
public findAllIterator ( string $configurationHash = null ) : Doctrine\ORM\Internal\Hydration\IterableResult
$configurationHash string Optional filtering by configuration hash (preset)
return Doctrine\ORM\Internal\Hydration\IterableResult

findOneByAssetAndThumbnailConfiguration() public method

Returns a thumbnail of the given asset with the specified dimensions.
public findOneByAssetAndThumbnailConfiguration ( Neos\Media\Domain\Model\AssetInterface $asset, ThumbnailConfiguration $configuration ) : Thumbnail
$asset Neos\Media\Domain\Model\AssetInterface The asset to render a thumbnail for
$configuration Neos\Media\Domain\Model\ThumbnailConfiguration
return Neos\Media\Domain\Model\Thumbnail The thumbnail or NULL

findUngeneratedIterator() public method

Find ungenerated objects and return an IterableResult
public findUngeneratedIterator ( ) : Doctrine\ORM\Internal\Hydration\IterableResult
return Doctrine\ORM\Internal\Hydration\IterableResult

iterate() public method

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
return Generator

Property Details

$entityManager protected property

protected ObjectManager,Doctrine\Common\Persistence $entityManager
return Doctrine\Common\Persistence\ObjectManager