{"id":14966759,"url":"https://github.com/yii2mod/yii2-editable","last_synced_at":"2025-05-07T13:07:17.344Z","repository":{"id":23934156,"uuid":"27315365","full_name":"yii2mod/yii2-editable","owner":"yii2mod","description":"Editable widget and column for gridview.","archived":false,"fork":false,"pushed_at":"2020-01-04T17:21:46.000Z","size":195,"stargazers_count":54,"open_issues_count":5,"forks_count":14,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-07T13:07:12.282Z","etag":null,"topics":["yii2","yii2-editable","yii2-editable-column","yii2-editable-widget","yii2-extension"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"espressif/arduino-esp32","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yii2mod.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-29T21:19:28.000Z","updated_at":"2024-05-04T12:39:36.000Z","dependencies_parsed_at":"2022-08-24T14:09:33.343Z","dependency_job_id":null,"html_url":"https://github.com/yii2mod/yii2-editable","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yii2mod%2Fyii2-editable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yii2mod%2Fyii2-editable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yii2mod%2Fyii2-editable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yii2mod%2Fyii2-editable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yii2mod","download_url":"https://codeload.github.com/yii2mod/yii2-editable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252883204,"owners_count":21819160,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["yii2","yii2-editable","yii2-editable-column","yii2-editable-widget","yii2-extension"],"created_at":"2024-09-24T13:36:54.167Z","updated_at":"2025-05-07T13:07:17.320Z","avatar_url":"https://github.com/yii2mod.png","language":"PHP","funding_links":["https://www.patreon.com/yii2mod"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/yiisoft\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://avatars0.githubusercontent.com/u/993323\" height=\"100px\"\u003e\n    \u003c/a\u003e\n    \u003ch1 align=\"center\"\u003eYii2 Editable Widget\u003c/h1\u003e\n    \u003cbr\u003e\n\u003c/p\u003e\n\nRenders a [X-Editable Input](http://vitalets.github.io/x-editable/index.html) allowing to use the amazing inline capabilities of [X-Editable Plugin](http://vitalets.github.io/x-editable/index.html). \n\n[![Latest Stable Version](https://poser.pugx.org/yii2mod/yii2-editable/v/stable)](https://packagist.org/packages/yii2mod/yii2-editable) [![Total Downloads](https://poser.pugx.org/yii2mod/yii2-editable/downloads)](https://packagist.org/packages/yii2mod/yii2-editable) [![License](https://poser.pugx.org/yii2mod/yii2-editable/license)](https://packagist.org/packages/yii2mod/yii2-editable)\n[![Build Status](https://travis-ci.org/yii2mod/yii2-editable.svg?branch=master)](https://travis-ci.org/yii2mod/yii2-editable)\n\nInstallation\n------------\n\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/).\n\nEither run\n\n```\nphp composer.phar require --prefer-dist yii2mod/yii2-editable \"*\"\n```\n\nor add\n\n```\n\"yii2mod/yii2-editable\": \"*\"\n```\n\nto the require section of your composer.json.\n\n\nUsage Editable column\n---------------------------------------\n1) In your gridview columns section\n\n**Text column:**\n```php\n [\n    'class' =\u003e EditableColumn::class,\n    'attribute' =\u003e 'username',\n    'url' =\u003e ['change-username'],\n ],\n```\n**Select column:**\n```php\n[\n    'class' =\u003e EditableColumn::class,\n    'attribute' =\u003e 'status',\n    'url' =\u003e ['change-username'],\n    'type' =\u003e 'select',\n    'editableOptions' =\u003e function ($model) {\n        return [\n            'source' =\u003e [1 =\u003e 'Active', 2 =\u003e 'Deleted'],\n            'value' =\u003e $model-\u003estatus,\n        ];\n    },\n],\n```\n\u003e Allowed column types: text, select, address, combodate, date, datetime\n\n2) And add to your controller\n```php\npublic function actions()\n{\n    return [\n        'change-username' =\u003e [\n            'class' =\u003e EditableAction::class,\n            'modelClass' =\u003e UserModel::class,\n        ],\n    ];\n}\n```\nUsage Editable widget\n---------------------------------\n\n1) As a widget with a model\n\n```php\n\\yii2mod\\editable\\Editable::widget([\n    'model' =\u003e $model,\n    'attribute' =\u003e 'firstName',\n    'url' =\u003e '/profile/update',\n]);\n```\n\n2) With ActiveForm\n\n```php\necho $form-\u003efield($model, \"firstName\")-\u003ewidget(\\yii2mod\\editable\\Editable::class, [\n    'url' =\u003e '/profile/update',\n    'mode' =\u003e 'popup',\n]);\n```\n\n## Support us\n\nDoes your business depend on our contributions? Reach out and support us on [Patreon](https://www.patreon.com/yii2mod). \nAll pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyii2mod%2Fyii2-editable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyii2mod%2Fyii2-editable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyii2mod%2Fyii2-editable/lists"}