PHP Class Neos\Flow\Command\ResourceCommandController

Inheritance: extends Neos\Flow\Cli\CommandController
Datei anzeigen Open project: neos/flow-development-collection

Protected Properties

Property Type Description
$messageCollector Neos\Flow\ResourceManagement\Publishing\MessageCollector
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$packageManager Neos\Flow\Package\PackageManagerInterface
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$resourceManager Neos\Flow\ResourceManagement\ResourceManager
$resourceRepository Neos\Flow\ResourceManagement\ResourceRepository

Public Methods

Method Description
cleanCommand ( ) : void Clean up resource registry
copyCommand ( string $sourceCollection, string $targetCollection, boolean $publish = false ) : void Copy resources
publishCommand ( string $collection = null ) : void Publish resources

Protected Methods

Method Description
clearState ( integer $iteration ) : void This method is used internal as a callback method to clear doctrine states

Method Details

cleanCommand() public method

This command checks the resource registry (that is the database tables) for orphaned resource objects which don't seem to have any corresponding data anymore (for example: the file in Data/Persistent/Resources has been deleted without removing the related PersistentResource object). If the Neos.Media package is active, this command will also detect any assets referring to broken resources and will remove the respective Asset object from the database when the broken resource is removed. This command will ask you interactively what to do before deleting anything.
public cleanCommand ( ) : void
return void

clearState() protected method

This method is used internal as a callback method to clear doctrine states
protected clearState ( integer $iteration ) : void
$iteration integer
return void

copyCommand() public method

This command copies all resources from one collection to another storage identified by name. The target storage must be empty and must not be identical to the current storage of the collection. This command merely copies the binary data from one storage to another, it does not change the related PersistentResource objects in the database in any way. Since the PersistentResource objects in the database refer to a collection name, you can use this command for migrating from one storage to another my configuring the new storage with the name of the old storage collection after the resources have been copied.
public copyCommand ( string $sourceCollection, string $targetCollection, boolean $publish = false ) : void
$sourceCollection string The name of the collection you want to copy the assets from
$targetCollection string The name of the collection you want to copy the assets to
$publish boolean If enabled, the target collection will be published after the resources have been copied
return void

publishCommand() public method

This command publishes the resources of the given or - if none was specified, all - resource collections to their respective configured publishing targets.
public publishCommand ( string $collection = null ) : void
$collection string If specified, only resources of this collection are published. Example: 'persistent'
return void

Property Details

$messageCollector protected_oe property

protected MessageCollector,Neos\Flow\ResourceManagement\Publishing $messageCollector
return Neos\Flow\ResourceManagement\Publishing\MessageCollector

$objectManager protected_oe property

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
return Neos\Flow\ObjectManagement\ObjectManagerInterface

$packageManager protected_oe property

protected PackageManagerInterface,Neos\Flow\Package $packageManager
return Neos\Flow\Package\PackageManagerInterface

$persistenceManager protected_oe property

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

$resourceManager protected_oe property

protected ResourceManager,Neos\Flow\ResourceManagement $resourceManager
return Neos\Flow\ResourceManagement\ResourceManager

$resourceRepository protected_oe property

protected ResourceRepository,Neos\Flow\ResourceManagement $resourceRepository
return Neos\Flow\ResourceManagement\ResourceRepository