« HS-CMS documentation home

Events

Overview

Events are “fired” or called when a certain action occurs. The most important aspect of them is triggering cache cleanups. They also function as “hooks” for plugins.

There are default events which manage caching and such, which are installation-wide and live in core/events, but should not be modified by you, the user. There are also site-specific events which are generated automatically by HS-CMS, and live in sites/example/events, but these should not be modified by you either, as doing so will make event behavior unpredictable. If you would like the ability to add custom events without installing a module (i.e. when HS-CMS adds site-specific events for that module), contact the developer.

Therefore the following information is primarily for developers of HoganSystem CMS.

HS_new_page

Actually called for new pages (when you create a page) AND when a page becomes public. This could happen when switching page type or robot visibility, as well. Its effects should generally be the opposite as HS_remove_page (with possibly the same exact function calls, such as deleting parts of the cache).

HS_edit_page

When the content or any properties/attributes/meta-values of a page change. The page in question’s data will be

HS_remove_page

Actually called when pages are deleted OR made invisible to robots OR becomes not publicly viewable. Generally should be the same as HS_add_page (with the opposite effects).