{"id":15988549,"url":"https://github.com/alexeevdv/yii2-bootstrap-toggle","last_synced_at":"2026-05-09T00:06:47.274Z","repository":{"id":56944546,"uuid":"97204002","full_name":"alexeevdv/yii2-bootstrap-toggle","owner":"alexeevdv","description":"Yii2 extension to render bootstrap toggle widget instead of checkbox.","archived":false,"fork":false,"pushed_at":"2018-07-16T05:10:34.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T06:54:35.549Z","etag":null,"topics":["bootstrap","bootstrap-toggle","yii2","yii2-extension","yii2-widgets"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexeevdv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-14T07:04:59.000Z","updated_at":"2025-01-04T13:05:59.000Z","dependencies_parsed_at":"2022-08-21T07:50:50.822Z","dependency_job_id":null,"html_url":"https://github.com/alexeevdv/yii2-bootstrap-toggle","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeevdv%2Fyii2-bootstrap-toggle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeevdv%2Fyii2-bootstrap-toggle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeevdv%2Fyii2-bootstrap-toggle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeevdv%2Fyii2-bootstrap-toggle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexeevdv","download_url":"https://codeload.github.com/alexeevdv/yii2-bootstrap-toggle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256855,"owners_count":20909364,"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":["bootstrap","bootstrap-toggle","yii2","yii2-extension","yii2-widgets"],"created_at":"2024-10-08T04:05:22.985Z","updated_at":"2026-05-09T00:06:42.255Z","avatar_url":"https://github.com/alexeevdv.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"yii2-bootstrap-toggle\n===========\n\n[![Build Status](https://travis-ci.org/alexeevdv/yii2-bootstrap-toggle.svg?branch=master)](https://travis-ci.org/alexeevdv/yii2-bootstrap-toggle)\n[![codecov](https://codecov.io/gh/alexeevdv/yii2-bootstrap-toggle/branch/master/graph/badge.svg)](https://codecov.io/gh/alexeevdv/yii2-bootstrap-toggle)\n![PHP 5.6](https://img.shields.io/badge/PHP-5.6-green.svg) \n![PHP 7.0](https://img.shields.io/badge/PHP-7.0-green.svg)\n![PHP 7.1](https://img.shields.io/badge/PHP-7.1-green.svg) \n![PHP 7.2](https://img.shields.io/badge/PHP-7.2-green.svg)\n\nYii2 extension to render [bootstrap toggle](http://www.bootstraptoggle.com/) widget instead of checkbox.\n\n![Screenshot](screenshot.jpg)\n\n## Installation\n\nThe preferred way to install this extension is through [composer](https://getcomposer.org/download/).\n\nEither run\n\n```\n$ php composer.phar require alexeevdv/yii2-bootstrap-toggle \"~2.0\"\n```\n\nor add\n\n```\n\"alexeevdv/yii2-bootstrap-toggle\": \"~2.0\"\n```\n\nto the ```require``` section of your `composer.json` file.\n\n## Usage\n\n### In active form\n```php\nuse alexeevdv\\yii\\BootstrapToggleWidget;\n\n//...\necho $form-\u003efield($model, 'attribute')-\u003ewidget(BootstrapToggleWidget::class);\n//...\n```\n\n### Standalone widget\n\n```php\nuse alexeevdv\\yii\\BootstrapToggleWidget;\n\n//...\nBootstrapToggleWidget::widget([\n    'name' =\u003e 'is_enabled',\n    'value' =\u003e false,\n]);\n//...\n```\n\n## Options\n\n```php\nBootstrapToggleWidget::widget([\n    /**\n     * Wrapper tag name. If set to false no tag will be rendered\n     */\n    'container' =\u003e 'div',\n\n    /**\n     * Wrapper HTML attributes\n     */\n    'containerOptions' =\u003e [],\n    \n    /**\n     * Label when checkbox is checked\n     */\n    'labelEnabled' =\u003e 'Yes',\n    \n    /**\n     * Label when checkbox is not checked\n     */\n    'labelDisabled' =\u003e 'No',\n     \n    /**\n     * Value when checkbox is checked\n     */\n    'valueEnabled' =\u003e '1',\n\n    /**\n     * Value when checkbox is not checked\n     */\n    'valueDisabled' =\u003e '0',     \n     \n     /**\n      * Additional javascript options to Bootstrap Toggle plugin \n      */\n     'pluginOptions' =\u003e [],\n]);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexeevdv%2Fyii2-bootstrap-toggle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexeevdv%2Fyii2-bootstrap-toggle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexeevdv%2Fyii2-bootstrap-toggle/lists"}