Extending Aiki
From Aikiframework wiki
|
There are three main ways to extend aiki on-disk, with Extensions, Plugins, and soon Apps.
Below are the differences between the three systems for extending Aiki.
Extensions
Extensions are a way to create php code that can be used in Aiki, You create another class that will act like Aiki build in classes that can be executed from a widgets. The class need to ba named the same as the file like other build in classes.
You can execute the function/method from the class in widget using script
(script( $aiki->YourClass->yourFunction('argument'); )script)
Plugins
Plugins are a way to extend aiki using encapsulated code that is able to be enabled per aiki site, view or language. You register a plugin based upon actions that are inside Aiki's code, and when an action happens, your customized code is called. Plugins act like filters you receive content of the widget which you can do whatever you what with it (like adding new markup/parser) and return result that will be returned to the browser.
Apps
Apps are a snapshot of aiki functionality that are a set of files and/or widgets and/or extensions taht can manipulate the database and can have its own database tables. Apps may have their URLs from where to be accessed.
Sites
Aiki defines site in table aiki_sites. You can have more than one sites. Apps that have widgets are also defined as sites.

