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

  TYPO3\CMS\Workspaces\:
    resource: '../Classes/*'

  cache.workspaces:
    class: TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
    factory: ['@TYPO3\CMS\Core\Cache\CacheManager', 'getCache']
    arguments: ['workspaces_cache']

  TYPO3\CMS\Workspaces\Preview\PreviewUriBuilder:
    public: true

  TYPO3\CMS\Workspaces\Service\GridDataService:
    public: true

  TYPO3\CMS\Workspaces\Service\WorkspaceService:
    public: true
    shared: true

  TYPO3\CMS\Workspaces\Controller\PreviewController:
    tags: ['backend.controller']

  TYPO3\CMS\Workspaces\Controller\ReviewController:
    tags: ['backend.controller']

  TYPO3\CMS\Workspaces\Command\WorkspaceVersionRecordsCommand:
    tags:
      - name: 'console.command'
        command: 'cleanup:versions'
        description: 'Find all versioned records and possibly cleans up invalid records in the database.'

  TYPO3\CMS\Workspaces\Command\CleanupPreviewLinksCommand:
    tags:
      - name: 'console.command'
        command: 'cleanup:previewlinks'
        description: 'Clean up expired preview links from shared workspace previews.'

  TYPO3\CMS\Workspaces\Command\AutoPublishCommand:
    tags:
      - name: 'console.command'
        command: 'workspace:autopublish'
        description: 'Publish a workspace with a publication date.'
