himiklab/yii2-handsontable-widget

This package is abandoned and no longer maintained. No replacement package was suggested.

A minimalist Excel-like grid widget for Yii2

Installs: 8 222

Dependents: 1

Suggesters: 0

Security: 0

Stars: 16

Watchers: 3

Forks: 8

Open Issues: 1

Type:yii2-extension

1.1.1 2018-10-18 08:52 UTC

This package is auto-updated.

Last update: 2022-01-12 15:41:29 UTC


README

A minimalist Excel-like grid widget for Yii2 based on Handsontable.

Packagist Packagist license

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist "himiklab/yii2-handsontable-widget" "*"

or add

"himiklab/yii2-handsontable-widget" : "*"

to the require section of your application's composer.json file.

Usage

use himiklab\handsontable\HandsontableWidget;

<?= HandsontableWidget::widget([
    'settings' => [
        'data' => [
            ['A1', 'B1', 'C1'],
            ['A2', 'B2', 'C2'],
        ],
        'colHeaders' => true,
        'rowHeaders' => true,
    ]
]) ?>

or with ActiveRecord

in view:

use himiklab\handsontable\HandsontableWidget;

<?= HandsontableWidget::widget([
    'requestUrl' => 'hts',
    'isRemoteChange' => true,
]); ?>

in controller:

use app\models\Page;
use himiklab\handsontable\actions\HandsontableActiveAction;

public function actions()
{
    return [
        'hts' => [
            'class' => HandsontableActiveAction::className(),
            'model' => Page::className(),
            'isChangeable' => true,
        ],
    ];
}