frostealth / yii2-array-field
Behavior that allows you to store arrays in attributes
Package info
github.com/frostealth/yii2-array-field
Type:yii2-extension
pkg:composer/frostealth/yii2-array-field
v1.0.2
2015-11-11 13:25 UTC
Requires
- php: >=5.4.0
- yiisoft/yii2: ~2.0
This package is not auto-updated.
Last update: 2026-03-15 01:48:35 UTC
README
This Yii2 model behavior allows you to store arrays in attributes.
Installation
Run the Composer command to install the latest stable version:
composer require frostealth/yii2-array-field @stable
Usage
Just attach the behavior to your model.
use frostealth\yii2\behaviors\ArrayFieldBehavior; public function behaviors() { return [ [ 'class' => ArrayFieldBehavior::className(), 'attributes' => ['attribute1', 'attribute2'], // 'defaultEncodedValue' => null, // 'defaultDecodedValue' => [], ], ]; }
License
The MIT License (MIT). See LICENSE.md for more information.