PHP Class Neos\Media\Command\MediaCommandController

Inheritance: extends Neos\Flow\Cli\CommandController
Afficher le fichier Open project: neos/neos-development-collection

Protected Properties

Свойство Type Description
$assetRepository Neos\Media\Domain\Repository\AssetRepository
$asyncThumbnails boolean If enabled
$dbalConnection Doctrine\DBAL\Connection
$entityManager Doctrine\Common\Persistence\ObjectManager
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$thumbnailRepository Neos\Media\Domain\Repository\ThumbnailRepository
$thumbnailService Neos\Media\Domain\Service\ThumbnailService

Méthodes publiques

Méthode Description
clearThumbnailsCommand ( string $preset = null ) : void Remove thumbnails
createThumbnailsCommand ( string $preset = null, boolean $async = null ) : void Create thumbnails
importResourcesCommand ( boolean $simulate = false ) : void Import resources to asset management
renderThumbnailsCommand ( integer $limit = null ) : void Render ungenerated thumbnails

Méthodes protégées

Méthode Description
initializeConnection ( ) : void Initializes the DBAL connection which is currently bound to the Doctrine Entity Manager

Method Details

clearThumbnailsCommand() public méthode

Removes all thumbnail objects and their resources. Optional preset parameter to only remove thumbnails matching a specific thumbnail preset configuration.
public clearThumbnailsCommand ( string $preset = null ) : void
$preset string Preset name, if provided only thumbnails matching that preset are cleared
Résultat void

createThumbnailsCommand() public méthode

Creates thumbnail images based on the configured thumbnail presets. Optional preset parameter to only create thumbnails for a specific thumbnail preset configuration. Additionally accepts a async parameter determining if the created thumbnails are generated when created.
public createThumbnailsCommand ( string $preset = null, boolean $async = null ) : void
$preset string Preset name, if not provided thumbnails are created for all presets
$async boolean Asynchronous generation, if not provided the setting ``Neos.Media.asyncThumbnails`` is used
Résultat void

importResourcesCommand() public méthode

This command detects Flow "PersistentResource"s which are not yet available as "Asset" objects and thus don't appear in the asset management. The type of the imported asset is determined by the file extension provided by the PersistentResource.
public importResourcesCommand ( boolean $simulate = false ) : void
$simulate boolean If set, this command will only tell what it would do instead of doing it right away
Résultat void

initializeConnection() protected méthode

Initializes the DBAL connection which is currently bound to the Doctrine Entity Manager
protected initializeConnection ( ) : void
Résultat void

renderThumbnailsCommand() public méthode

Loops over ungenerated thumbnails and renders them. Optional limit parameter to limit the amount of thumbnails to be rendered to avoid memory exhaustion.
public renderThumbnailsCommand ( integer $limit = null ) : void
$limit integer Limit the amount of thumbnails to be rendered to avoid memory exhaustion
Résultat void

Property Details

$assetRepository protected_oe property

protected AssetRepository,Neos\Media\Domain\Repository $assetRepository
Résultat Neos\Media\Domain\Repository\AssetRepository

$asyncThumbnails protected_oe property

If enabled
protected bool $asyncThumbnails
Résultat boolean

$dbalConnection protected_oe property

protected Connection,Doctrine\DBAL $dbalConnection
Résultat Doctrine\DBAL\Connection

$entityManager protected_oe property

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

$persistenceManager protected_oe property

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
Résultat Neos\Flow\Persistence\PersistenceManagerInterface

$thumbnailRepository protected_oe property

protected ThumbnailRepository,Neos\Media\Domain\Repository $thumbnailRepository
Résultat Neos\Media\Domain\Repository\ThumbnailRepository

$thumbnailService protected_oe property

protected ThumbnailService,Neos\Media\Domain\Service $thumbnailService
Résultat Neos\Media\Domain\Service\ThumbnailService