Skip to content

Technical Plugin Framework

Daniel Neto edited this page Oct 29, 2026 · 1 revision

Technical plugin framework

Audience: developers. Baseline reviewed: 2026-10-29. Plugin catalog.

Loading and ownership

AVideoPlugin::loadPlugin($name, $forceReload = false) normalizes the plugin name and loads its class file from plugin/<name>/<name>.php. loadPluginIfEnabled() adds the enabled-state decision. Loading a class and enabling its behavior are different operations.

PluginAbstract supplies the contract and defaults; objects/plugin.php supplies plugin registry/dependency types. Installed plugin data is tracked through the plugins table, including UUID, directory, status, version and serialized settings. Some plugins have independent repositories and are distributed separately. The documentation remains in this wiki while linking back to each actual source owner.

Use the source references for exact signatures; preserve external/community plugins when changing shared dispatch behavior.

Hook families

Family Examples Meaning
Page assets and markup getHeadCode, getFooterCode, getHTMLBody Add content at defined render stages
Navigation and presentation getHTMLMenuLeft, getPluginMenu, getFirstPage Supply navigation/admin links or a first-page implementation
Video lifecycle onNewVideo, onUploadIsDone, onEncoderNotifyIsDone, afterNewVideo React to distinct stages, not interchangeable completion events
Account/access integration userCanUpload, userCanWatchVideo, getDynamicUserGroupsId Contribute capability/group/access decisions
Live callbacks on_publish, on_publish_done React to publish/session events from the live integration
Periodic work executeEveryMinute, executeEveryHour, executeEveryDay, executeEveryMonth Run through scheduled dispatch
Media delivery modifyURL, xsendfilePreVideoPlay Participate in URL/file delivery

Hook dispatchers differ in how they combine results. Read the specific dispatcher before assuming the first, last, boolean or merged result wins. An override can also be intentionally empty; the generated inventory records its existence, not a guarantee of behavior.

Settings

getEmptyDataObject() constructs defaults. PluginAbstract::getDataObject() merges them with stored settings and adjusts structured option definitions/types. getDataObjectHelper() exposes field descriptions supplied with addDataObjectHelper().

AVideoPlugin::getObjectData() is an alias into the plugin data path; enabled-only accessors should be distinguished from unconditional loading. The createTable() administration helper builds existing plugin configuration UI rather than requiring a custom renderer for every field.

A generated field table records literal source assignments. It does not execute the constructor, resolve branches, expand globals or expose saved installation values. Inspect runtime consumers for the effective behavior.

Dependencies

getPluginDependencies() returns PluginDependency declarations used by shared dependency-warning UI. A declaration marked optional is different from a mandatory prerequisite. A literal AVideoPlugin::getObjectData() or loadPlugin() call is a runtime reference and does not automatically prove a hard dependency.

Schema lifecycle

Plugin SQL is owned by that plugin. PluginAbstract::updateScript() discovers versioned updateV*.sql files and compares versions through the plugin framework. Plugins can override update logic. Read the actual implementation and installed state before discussing automatic installation or migration behavior.

Released migrations are historical records. New schema changes need a new migration and compatibility with upgraded-in-place installations. Do not run every historical SQL file manually as a diagnostic step.

Clone this wiki locally