Recommend this page to a friend! |
Classes of Matteo Hertel | MH_Widget | README.MD | Download |
|
DownloadMH_WidgetDemo: http://test.matteohertel.uk/mh_widget/ Flexible, highly configurable widget system replace an HTML place holder with any content. The main purpose for this package was to be used alongside a text editor like CKEditor to implement a flexible widget system for the end user(http://docs.ckeditor.com/#!/guide/widget_sdk_tutorial_1) This package will provide a nice and neat interface to create widgets ready to use in any project, there are a lots of feature straight out of the box, but with its flexible nature can fit any need. There are two main ways to use this package: - Use the widget system standalone as easy way to render HTML - Use the widget system with the integrated parser To use the widget standalone:
The single widget workflow is:
Using the parserWith the integrated parser you can use a custom non-standard html tag mhwidget with attributes to render content from the widget, and example of a working tag:
Under the hoodTo be a proper widget the class must extend the WidgetAbstract class and override the UsageSimple hello world
Gravatar
ExampleTo see the package in action run the following(php must be available in the console):
the open your browser to http://localhost:8080 Version0.2 FeedbackPlease, send me your feedback, using the issue tracker on github or via email to info[at]matteohertel.com DependenciesThere are no external dependencies but the Parser require the native DOMDocument class and a the widget tag syntax must be right to work properly LicenseMIT |