\CQRSExtension
Class CQRSExtension TODO: Better Buttons Actions return "1" on success TODO: Reload logic when CQRS actions are applied to reflect new state immediately
Synopsis
class CQRSExtension
extends Extension
{
- // members
- private static array $better_buttons_actions = ;
- private static boolean $only_admin_can_update = false;
- private static string $payload_store_handler_type = RedisPayloadStoreHandler::class;
- private $key;
- private PayloadManifestParser $parser;
- private PayloadStoreHandler $payloadStoreHandler;
- // methods
- public void __construct()
- public void onAfterWrite()
- public void onAfterDelete()
- public PayloadStoreHandler getActiveHandler()
- private string getPayloadStoreKey()
- private array getCommitedPayload()
- private string getPayloadChecksum()
- public bool isInSync()
- public void updateCMSActions()
- public bool writeToPayloadStore()
- public array|bool getWritePayload()
- public void removeFromPayloadStore()
- public void updateBetterButtonsActions()
- public bool canManipulatePayloadStore()
- public mixed getErrorMessageForTemplate()
- public array getValidationErrors()
Hierarchy
Extends
- Extension
Members
private
- $key — string
- $only_admin_can_update
- $parser — PayloadManifestParser
- $payloadStoreHandler — PayloadStoreHandler
- $payload_store_handler_type — string
Methods
private
- getCommitedPayload() — Obtains the commited payload
- getPayloadChecksum() — Generates a MD5 hash of the given payload.
- getPayloadStoreKey()
public
- __construct() — CQRSExtension constructor.
- canManipulatePayloadStore()
- getActiveHandler()
- getErrorMessageForTemplate() — Renders a list of validation errors.
- getValidationErrors() — Return the list of validation errors if exists.
- getWritePayload() — Get the committed payload which should be written to the current payload store.
- isInSync() — Checks if the current data is equal to the commited payload.
- onAfterDelete()
- onAfterWrite()
- removeFromPayloadStore() — Removes the current record from the payload store
- updateBetterButtonsActions() — Provides BetterButtonsAction for Super-Admin View.
- updateCMSActions()
- writeToPayloadStore() — Writes the committed payload to the current payload store.