2017 © Pedro Peláez
 

yii2-extension yii2-editable

Yii2 editable field extension

image

yii2mod/yii2-editable

Yii2 editable field extension

  • Tuesday, July 31, 2018
  • by disem
  • Repository
  • 5 Watchers
  • 29 Stars
  • 28,241 Installations
  • PHP
  • 8 Dependents
  • 0 Suggesters
  • 12 Forks
  • 1 Open issues
  • 11 Versions
  • 10 % Grown

The README.md

, (*1)

Yii2 Editable Widget


Renders a X-Editable Input allowing to use the amazing inline capabilities of X-Editable Plugin., (*2)

Latest Stable Version Total Downloads License Build Status, (*3)

Installation

The preferred way to install this extension is through composer., (*4)

Either run, (*5)

php composer.phar require --prefer-dist yii2mod/yii2-editable "*"

or add, (*6)

"yii2mod/yii2-editable": "*"

to the require section of your composer.json., (*7)

Usage Editable column

1) In your gridview columns section, (*8)

Text column:, (*9)

 [
    'class' => EditableColumn::class,
    'attribute' => 'username',
    'url' => ['change-username'],
 ],

Select column:, (*10)

[
    'class' => EditableColumn::class,
    'attribute' => 'status',
    'url' => ['change-username'],
    'type' => 'select',
    'editableOptions' => function ($model) {
        return [
            'source' => [1 => 'Active', 2 => 'Deleted'],
            'value' => $model->status,
        ];
    },
],

Allowed column types: text, select, address, combodate, date, datetime, (*11)

2) And add to your controller, (*12)

public function actions()
{
    return [
        'change-username' => [
            'class' => EditableAction::class,
            'modelClass' => UserModel::class,
        ],
    ];
}

Usage Editable widget

1) As a widget with a model, (*13)

\yii2mod\editable\Editable::widget([
    'model' => $model,
    'attribute' => 'firstName',
    'url' => '/profile/update',
]);

2) With ActiveForm, (*14)

echo $form->field($model, "firstName")->widget(\yii2mod\editable\Editable::class, [
    'url' => '/profile/update',
    'mode' => 'popup',
]);

Support us

Does your business depend on our contributions? Reach out and support us on Patreon. All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff., (*15)

The Versions

31/07 2018

dev-master

9999999-dev

Yii2 editable field extension

  Sources   Download

MIT

The Requires

 

The Development Requires

by Igor Chepurnoi

yii2 yii2 editable yii2 editable column yii2 editable field

15/01 2018

1.5

1.5.0.0

Yii2 editable field extension

  Sources   Download

MIT

The Requires

 

The Development Requires

by Igor Chepurnoi

yii2 yii2 editable yii2 editable column yii2 editable field

12/04 2017

1.4

1.4.0.0

Yii2 editable field extension

  Sources   Download

MIT

The Requires

 

The Development Requires

by Igor Chepurnoi

yii2 yii2 editable yii2 editable column yii2 editable field

01/01 2017

1.3

1.3.0.0

Yii2 editable field extension

  Sources   Download

MIT

The Requires

 

The Development Requires

by Igor Chepurnoi

yii2 yii2 editable yii2 editable column yii2 editable field

22/11 2016

1.2

1.2.0.0

Yii2 editable field extension

  Sources   Download

MIT

The Requires

 

by Igor Chepurnoi

extension yii2

01/07 2016

1.1.4

1.1.4.0

Yii2 editable field extension

  Sources   Download

MIT

The Requires

 

by Igor Chepurnoi

extension yii2

21/01 2016

1.1.3

1.1.3.0

Yii2 editable field extension

  Sources   Download

MIT

by Igor Chepurnoi

extension yii2

04/01 2016

1.1.2

1.1.2.0

Yii2 editable field extension

  Sources   Download

MIT

by Igor Chepurnoi

extension yii2

16/12 2015

1.1.1

1.1.1.0

Yii2 editable field extension

  Sources   Download

MIT

by Igor Chepurnoi

extension yii2

16/09 2015

1.1

1.1.0.0

Yii2 editable field extension

  Sources   Download

MIT

by Igor Chepurnoi

extension yii2

17/06 2015

1.0

1.0.0.0

Yii2 editable field extension

  Sources   Download

MIT

by Igor Chepurnoi

extension yii2