services:
  _defaults:
    autowire: true
    autoconfigure: true
    public: false

  Causal\ImageAutoresize\Controller\FormFlexAjaxController:
    public: true

  Causal\ImageAutoresize\Command\BatchResize:
    tags:
      - name: 'console.command'
        command: 'imageautoresize:batchresize'
        schedulable: true
        description: 'Searches for files that were not resized automatically during upload (e.g., because they were uploaded through a direct mechanism such as FTP) and resizes them according to your rules. Group-related rules are skipped.'

  Causal\ImageAutoresize\EventListener\ExtensionManagerEventListener:
    tags:
      - name: event.listener
        identifier: 'causal/image_autoresize'
        method: 'processActions'
        event: TYPO3\CMS\Extensionmanager\Event\AvailableActionsForExtensionEvent

  Causal\ImageAutoresize\EventListener\CoreResourceStorageEventListener:
    tags:
      - name: event.listener
        identifier: 'causal/image_autoresize'
        method: 'sanitizeFileName'
        event: TYPO3\CMS\Core\Resource\Event\SanitizeFileNameEvent
      - name: event.listener
        identifier: 'causal/image_autoresize'
        method: 'afterFileReplaced'
        event: TYPO3\CMS\Core\Resource\Event\AfterFileReplacedEvent
      - name: event.listener
        identifier: 'causal/image_autoresize'
        method: 'beforeFileAdded'
        event: TYPO3\CMS\Core\Resource\Event\BeforeFileAddedEvent
      - name: event.listener
        identifier: 'causal/image_autoresize'
        method: 'populateMetadata'
        event: TYPO3\CMS\Core\Resource\Event\AfterFileAddedEvent
