dotallineed / yii2-widgets-builder
An extension for creating and storing html widgets with content to the database for Yii2 site builder
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2025-02-10 15:22:36 UTC
README
An extension for creating and storing html widgets with content to the database for Yii2 site builder
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist dotallineed/yii2-widgets-builder "dev-master"
or add
"dotallineed/yii2-widgets-builder": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, Add the following code in your main configuration file
'builderwidgets' => [ 'class' => 'dotallineed\widgetsbuilder\BuilderWidget', 'storage' => [ 'class' => 'dotallineed\widgetsbuilder\MultipleStorage', 'storages' => [ [ 'class' => 'dotallineed\widgetsbuilder\DatabaseStorage', 'table' => 'builder_widgets', ], ], ] ],
and simply use it in your code by :
$builder_widgets=Yii::$app->builderwidgets;```