2019-04-25 -> 2021-06-22
A type of widget for the kit system.
This is part of the universe framework.
Using the planet installer via light-cli
lt install Ling.Kit_PrototypeWidget
Using the uni command.
uni import Ling/Kit_PrototypeWidget
Or just download it and place it where you want otherwise.
- Kit_PrototypeWidget api (generated with DocTools)
- Pages
- What is it used for?
- The Prototype widget array
- Related
- History Log
In a nutshell, the prototype widget renders a file as is.
It's used when you want to convert a static html layout into a php dynamic layout.
Rather than doing it one widget at the time, you can quickly configure the zones and widgets, and replace them all at once.
Then, in a second iteration, you can work on individual widgets one by one to add the php dynamism.
So, here is the configuration array for the picasso widget:
type: prototype # or any other string, as long as it's registered to the KitPageRenderer instance
template: $templateName # for instance: default.php, or prototype.php. This is the path to the template file, relative to the templates rootDir
Note: this merges with the widget array defined in the kit configuration array.
The templates root dir is just a directory that you define, usually the application directory.
To register the PrototypeWidgetHandler:
$kit = new KitPageRenderer();
// ...
// define the handler
$h = new PrototypeWidgetHandler();
$h->setRootDir("/path/to/my_app");
$kit->registerWidgetHandler('prototype', $h);
// ...
- Kit: the widget rendering system
- Kit_PicassoWidget: another widget type
-
1.1.9 -- 2021-06-22
- update PrototypeWidgetHandler, now z references widgetConf.vars instead of widgetConf
-
1.1.8 -- 2021-06-22
- update PrototypeWidgetHandler, now provides the widgetConf as the z variable for templates.
-
1.1.7 -- 2021-06-22
- update PrototypeWidgetHandler, add access to copilot instance
-
1.1.6 -- 2021-05-31
- Removing trailing plus in lpi-deps file (to work with Light_PlanetInstaller:2.0.0 api
-
1.1.5 -- 2021-04-08
- adapt api to Kit:1.14.0
-
1.1.4 -- 2021-04-08
- adapt api to Kit:1.13.0
-
1.1.3 -- 2021-03-05
- update README.md, add install alternative
-
1.1.2 -- 2020-12-08
- Fix lpi-deps not using natsort.
-
1.1.1 -- 2020-12-04
- Add lpi-deps.byml file
-
1.1.0 -- 2019-08-29
- update PrototypeWidgetHandler now implements KitPageRendererAwareInterface
-
1.0.1 -- 2019-07-18
- update docTools documentation, add links to source code for classes and methods
-
1.0.0 -- 2019-04-25
- initial commit