PHP Class Neos\Media\Command\MediaCommandController

Inheritance: extends Neos\Flow\Cli\CommandController
显示文件 Open project: neos/neos-development-collection

Protected Properties

Property 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

Public Methods

Method 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

Protected Methods

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

Method Details

clearThumbnailsCommand() public method

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

createThumbnailsCommand() public method

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

importResourcesCommand() public method

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

initializeConnection() protected method

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

renderThumbnailsCommand() public method

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

Property Details

$assetRepository protected_oe property

protected AssetRepository,Neos\Media\Domain\Repository $assetRepository
return Neos\Media\Domain\Repository\AssetRepository

$asyncThumbnails protected_oe property

If enabled
protected bool $asyncThumbnails
return boolean

$dbalConnection protected_oe property

protected Connection,Doctrine\DBAL $dbalConnection
return Doctrine\DBAL\Connection

$entityManager protected_oe property

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

$persistenceManager protected_oe property

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
return Neos\Flow\Persistence\PersistenceManagerInterface

$thumbnailRepository protected_oe property

protected ThumbnailRepository,Neos\Media\Domain\Repository $thumbnailRepository
return Neos\Media\Domain\Repository\ThumbnailRepository

$thumbnailService protected_oe property

protected ThumbnailService,Neos\Media\Domain\Service $thumbnailService
return Neos\Media\Domain\Service\ThumbnailService