vsk/yii2-editablecolumn Editable Column widget and module for Yii2

editablecolumn for Yii2 ¶

  1. Installation
  2. Usage

Installation ¶

The preferred way to install this extension is through composer.

Either run

composer require vsk/yii2-editablecolumn

or add

"vsk/yii2-editablecolumn" : "~1.0.0"

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

Usage ¶

Single column example Include in config module

'modules' => [
    ...
     'editablecolumn' => [
            'class' => \vsk\editableColumn\module\EditableColumnModule::class,
        ]
    ...
]

Add scenario in you model

    public function rules()
    {
        return [
            ...
            [['email'], 'email', 'on' => [self::SCENARIO_DEFAULT, EditableColumn::MODEL_SCENARIO_EDITABLE_COLUMN]],
            ...
         ];
    }

Include in you view

<?php

 echo  \vsk\editableColumn\EditableColumn::widget([
                'model'=>$model,
                'attribute' => 'email',
                'format' => \kartik\editable\Editable::FORMAT_BUTTON,
                'asPopover' => true,
                'type'=>'success',
                'size'=>'lg',
            ]);

1 0
2 followers
99 downloads
Yii Version: 2.0
License: BSD-3-Clause
Category: User Interface
Developed by: vetal06
Created on: Oct 2, 2018
Last updated: (not set)
Packagist Profile
Github Repository

Related Extensions