foldershare-8.x-1.2/foldershare.services.yml
foldershare.services.yml
#
# Define services provided by the module.
#
services:
#
# Breadcrumbs builder.
# --------------------
# The breadcrumb builder responds on module entity view pages, edit pages,
# and command forms, to build a breadcrumb based on the root-to-entity
# folder path.
#
foldershare.breadcrumb:
class: Drupal\foldershare\Entity\Builder\FolderShareBreadcrumbBuilder
arguments: ['@entity.manager', '@router.route_provider', '@access_manager', '@current_user', '@title_resolver']
tags:
- { name: breadcrumb_builder, priority: 100000 }
#
# FolderShare commands.
# ---------------------
# Commands are similar to Drupal actions, but they include multiple standard
# arguments (e.g. parent, selection) and detailed context information
# (e.g. 'upload' only works when viewing a folder). Command execution requires
# forwarding a command choice and parameters from the UI to code managed by the
# command plugin manager.
#
foldershare.plugin.manager.foldersharecommand:
class: Drupal\foldershare\Plugin\FolderShareCommandManager
arguments: ['@container.namespaces', '@cache.discovery', '@module_handler']
#
# Scheduled tasks.
# ----------------
# Scheduled tasks handle background activity for the module, including
# completing long-running or delated delete, copy, move, etc. Since CRON
# cannot be counted on to run frequently (it is often set to run only every
# hour), scheduled tasks are serviced after every page is returned to a user.
# This is similar to Drupal core's AutomatedCron, but without its limitation
# to a very coarse execution interval.
foldershare.scheduledtask.subscriber:
class: Drupal\foldershare\EventSubscriber\FolderShareScheduledTaskHandler
arguments: []
tags:
- { name: event_subscriber }
#
# Better HTTP exception logger.
# -----------------------------
# HTTP exceptions are automatically logged by Drupal core using a series of
# exception subscribers. But for some HTTP exceptions, the default subscribers
# output terse messages the omit the exception's own explanatory message.
# Instead, the module's subscriber overrides Drupal core and logs better
# messages for FolderShare-generated HTTP exceptions.
foldershare.httpexception.subscriber:
class: Drupal\foldershare\EventSubscriber\FolderShareHttpExceptionSubscriber
arguments: ['@http_kernel', '@logger.channel.php', '@redirect.destination', '@router.no_access_checks', '@logger.factory']
tags:
- { name: event_subscriber }
