skeeks / yii2-config
Form package for SkeekS CMS
Installs: 2 287
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Type:yii2-extension
Requires
- yiisoft/yii2: ^2.0.10
README
Links
namespace skeeks\cms\widgets; use skeeks\yii2\config\ConfigBehavior; use skeeks\yii2\config\ConfigTrait; use yii\base\Widget; use yii\helpers\ArrayHelper; /** * Class GridView * @package skeeks\cms */ class TestWidget extends Widget { use ConfigTrait; public $test = '22'; public $config = []; public function behaviors() { return ArrayHelper::merge(parent::behaviors(), [ ConfigBehavior::class => ArrayHelper::merge([ 'class' => ConfigBehavior::class, 'configModel' => [ 'fields' => [ 'test' ], 'attributeDefines' => [ 'test', ], 'attributeLabels' => [ 'test' => '111', ], 'attributeHints' => [ 'test' => '111', ], 'rules' => [ ['test', 'string'] ] ] ], (array) $this->config), ]); } public function run() { return $this->test; } }
SkeekS CMS (Yii2) — quickly, easily and effectively!
skeeks.com | cms.skeeks.com