Skip to content

Plugin for running files corresponding to the event name. Idea - is designed to simplify the management of plugins through version control systems and provide low coupling with the database for storing code

Notifications You must be signed in to change notification settings

OlegAnTo2000/ModxRevolutionFileEventsPlugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

ModxRevolutionFileEventsPlugin

Plugin for running files corresponding to the event name. Idea - is designed to simplify the management of plugins through version control systems and provide low coupling with the database for storing code

Start

  1. Create modx plugin with code from plugin.php
  2. Select Events in admin panel for plugin
  3. Place event files in core/elements/events/<EventName>/*.php

Example of event File

<?php
/** @var modX $modx */
/** @var modSystemEvent $event */
/** @var array $scriptProperties */
/** @var mixed $fenom */ // if possible

// Add comment to page content
if (isset($modx->resource) && isset($modx->resource->_output)) {
    $modx->resource->_output .= "\n<!-- handled by events: {$event->name} -->";
}

// Can return string to $event->output()
return '';

About

Plugin for running files corresponding to the event name. Idea - is designed to simplify the management of plugins through version control systems and provide low coupling with the database for storing code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages