# Customize a widget
Usually the HTML structure in wireframe mode is not optimize for a real integration. Minotaure plans a complete widget cloning.
You may not need all files from a widget, maybe you only want to customize de front view. See the complete list of command line here
# Cloning a widget
In this exemple, we are going to create a complete clone of news.
minotaure-theme and run
composer clone basic news all
This command line will create 2 folders if basic was not yet created and 3 files :
├──minotaure-theme | ├──widgets | | ├──basic | | | ├── news | | | | └── Register.php | | | | └── m_form.twig | | | | └── m_widget.twig
# what has been changed?
As you can see in
Register.php, the namespace has changed.
namespace\class must be unique.
#original namespace Be\Minotaure\Widgets\Basic\News; #clone namespace Widgets\Basic\News;
Minotaure need to make some difference between an original widget and a clone. All helpers and function are the same but namespace and views file name must be change.
#original form.twig widget.twig #clone m_form.twig m_widget.twig
In this file you can add and remove all inputs but do not forget to add/remove them in m_form.php and m_widget.php