Recommend this page to a friend! |
![]() |
Info | Example | Demos | ![]() |
![]() |
![]() |
Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 164 | All time: 8,925 This week: 49![]() |
Version | License | PHP version | Categories | |||
mh_widget 0.2 | MIT/X Consortium ... | 5.3 | HTML, PHP 5, Content management, Temp... |
Description | Author | |||||||||||||
This package can Generate HTML for embedded widgets from parameters. |
|
<?php |
Demo: 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:
With 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:
<mhwidget size="128" email="youremail@gravatr.com">Gravatar</mhwidget>
To be a proper widget the class must extend the WidgetAbstract class and override the __invoke
, controller
, model
and view
methods,
Simple hello world
$widget = new \MHDev\WidgetCore\MH_Widget("\MHDev\Widgets\\");
echo $widget("Example\HelloWorld");
Gravatar
$widget = new \MHDev\WidgetCore\MH_Widget("\MHDev\Widgets\\");
echo $widget("Gravatar", ["email" => "info@matteohertel.com", "size" => 80]);
To see the package in action run the following(php must be available in the console):
git clone https://github.com/matteo-hertel/MH_Widget.git
cd MH_Widget
php -S localhost:8080 -t ./Example
the open your browser to http://localhost:8080
0.2
Please, send me your feedback, using the issue tracker on github or via email to info[at]matteohertel.com
There are no external dependencies but the Parser require the native DOMDocument class and a the widget tag syntax must be right to work properly
MIT
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Doc. | Auxiliary data |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
![]() |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.