http request
Server variable
Change body title
Append body class
Set form value

Add helpers functions for ECA

Events

  • Preprocess event
  • Status message event

Actions:

  • Simple http request, if response data is json you can access with [token_name:json:response_data_key]
  • Workflow label
  • Workflow state
  • Get $_SERVER, $_COOKIE, $_SESSION, $_ENV, $_GET, $_POST variable
  • Set cookie value for response
  • Form Set any form element field value by key
  • Form Get any form element field value by key
  • Form attach library
  • Form add css class
  • Form dumper data (dev)
  • ThirtPartySetting Get/Set value
  • Preprocess Get/Set value for variables
  • Preprocess attach library
  • Preprocess add css class
  • Preprocess remove item
  • Headers Set/Remove values
  • Add custom tag/script/style to header, body top, body bottom
  • Alter status messages






ECA Quick Action
Create quick action for ECA without need define plugin and module.
Create file docroot/sites/eca/EcaActions.php


<?php
/**
 * Define the ECA quick actions.
 * 
 * Define action id, label, and callback, service.
 */
function ECAQuickActions(): array {
  return [
    "hello" => [
      "label" => "ECA Action Hello",
      "callback" => "eca_quick_actions_hello"
    ],
    "hello_inline" => [
      "label" => "ECA Action Inline",
      "callback" => function ($hello) {
        \Drupal::messenger()->addMessage('Inline callback' . $hello);
      }
    ],
    "hello_service" => [
      "label" => "ECA Action Call Drupal service",
      "service" => "messenger",
      "callback" => "addMessage"
    ]
  ];
}

function eca_quick_actions_hello($hello) {
  \Drupal::messenger()->addMessage('Hello world: ' . $hello);
  return "Hello world: " . $hello;
}

Use ECA Helper: Quick Action and choose the ECA Action Hello

SUPPORT DEVELOPMENT

Buy me a coffee 🥤

Donation vith Paypal by email: huynhkhacthao@gmail.com








Project information

Releases