Configuration via Configuration File
Configuration takes place via LocationAwareConfigRepository
, and can be done via YAML config or settings store.
Sample for yaml:
pimcore_copilot:
automation_actions:
# Configure actions for automating tasks.
actions:
name:
name: ~
title: ~
description: ~
# Optional: Configure permissions for action. Without permissions action is available for admin users only.
action_permissions:
roles:
#Name of user or role to be configured.
anakin:
# Permissions to be configured for user or role. Use values from ActionPermissionTypes enum.
permissions:
- !php/enum Pimcore\Bundle\CopilotBundle\ActionPermissions\ActionPermissionTypes::EXECUTE
users:
obi_wan:
permissions:
- !php/enum Pimcore\Bundle\CopilotBundle\ActionPermissions\ActionPermissionTypes::NONE
# Triggers define when action should be executed.
triggers:
# Execute action on regular base based on a cron definition.
schedule:
enabled: false
cron: ~
# Limits the scheduled job to a spesific type... object, asset or documents
type: ~
# When type is object, this limits the scheduled job to a spesific object class
object_class: ~
# Defines Subject Provider for schedule based execution.
subject_provider: ~
workspaces:
# Prototype
-
cpath: ~
include: ~
# Execute action manually by Pimcore Copilot dialog.
manual:
enabled: false
# Configure contexts when action should be available. Leave empty to always show action.
context_limitations: []
# Define search term(s) to be used for searching action in Copilot.
search_terms: []
# Define environment variables that should be entered when action is started and are available to all action steps during execution.
environment_variables:
# Prototype
-
type: ~ # One of Pimcore\Bundle\CopilotBundle\AutomationAction\Configuration\Environment\Type;Number;Date;Select;Checkbox;Matrix
name: ~
# Optional additional configuration for type, e.g. values for select or columns for matrix.
configuration: ~
# Define steps for action.
steps:
# Prototype
-
# Display name, must be unique, will be used in the logs
name: ~ # Required
# Name of step implementation as configured in 'pimcore_copilot.step_implementation_mapping'
step_implementation: ~ # Required
# Optional symfony expression for when step should be executed.
condition: ~
# Optional additional configuration for step depending on step implementation.
configuration: ~
# Optional define interaction that should be possible after action executed successfully.
post_execution_interaction: !php/const Pimcore\Bundle\CopilotBundle\AutomationAction\Configuration\PostInteractionTypes::NONE # One of Pimcore\Bundle\CopilotBundle\AutomationAction\Configuration\PostInteractionTypes::NONE; Pimcore\Bundle\CopilotBundle\AutomationAction\Configuration\PostInteractionTypes::RELOAD_SUBJECT
# Define icon path to be shown in Copilot for that action.
icon: null
# Define whether action should be expanded in Copilot window when started.
is_expanded_on_show: false
For sample configurations also see Included actions. Also have a look at Permissions to set up permissions for configured actions.