{"id":29027355,"url":"https://github.com/humaninitiative/yii-remember-gridview","last_synced_at":"2026-04-29T05:05:55.045Z","repository":{"id":90233352,"uuid":"172632158","full_name":"HumanInitiative/yii-remember-gridview","owner":"HumanInitiative","description":null,"archived":false,"fork":false,"pushed_at":"2019-02-26T03:38:45.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-26T17:41:26.064Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HumanInitiative.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-02-26T03:36:17.000Z","updated_at":"2019-02-26T03:38:47.000Z","dependencies_parsed_at":"2023-12-20T22:19:25.677Z","dependency_job_id":"9952b71e-4ab7-498a-a78f-83090a64d663","html_url":"https://github.com/HumanInitiative/yii-remember-gridview","commit_stats":null,"previous_names":["humanintiative/yii-remember-gridview","humaninitiative/yii-remember-gridview"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HumanInitiative/yii-remember-gridview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumanInitiative%2Fyii-remember-gridview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumanInitiative%2Fyii-remember-gridview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumanInitiative%2Fyii-remember-gridview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumanInitiative%2Fyii-remember-gridview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HumanInitiative","download_url":"https://codeload.github.com/HumanInitiative/yii-remember-gridview/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HumanInitiative%2Fyii-remember-gridview/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32411585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T03:46:11.172Z","status":"ssl_error","status_checked_at":"2026-04-29T03:37:55.317Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-06-26T06:05:28.773Z","updated_at":"2026-04-29T05:05:54.823Z","avatar_url":"https://github.com/HumanInitiative.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Yii Remember Gridview\n=============================\n\nForked from [pentium10/yii-remember-filters-gridview](http://github.com/zmiftah/yii-remember-gridview)\n\nThe ZRememberGridViewBehavior Yii extension adds up some functionality to the default possibilites of CActiveRecord/Model implementation.\n\nIt will detect the **search** scenario and it will save the filters from the GridView. This comes handy when you need to **remember them between navigation** during page changes. For lot of navigation and heavy filtering, this functionality can be activated by just a couple of lines.\n\nIt supports **default filter values** and **remember scenarios** also. For example if you want to show only eg: Active Products, you can setup the default filter using this extension. Or if you have the same modal on different views, you can set different scenarios to remember state separated from each other. See the optional params under Advanced Functionalities and Scenarios section. \n\n![Please login to see the Demo image!](https://raw.github.com/zmiftah/yii-remember-gridview/master/res/remember_filters_10.png \"Demo\")\n\nRequirements\n--------------------\n\n- Yii 1.1\n\nInstall\n---------\n\nWe recommend installing the extension with [Composer](http://getcomposer.org/). Add this to the `require` section of your `composer.json`:\n\n    \"zmiftah/yii-remember-gridview\" : \"dev-master\"\n\nYou also need to include composer's autoloader:\n\n```php\n    require_once __DIR__.'/protected/vendor/autoload.php';\n```\n\n\nUsage\n---------\n\nStep 1\n--------\n\nTo use this extension, just copy this file to your components/ directory, add 'import' =\u003e 'application.components.ZRememberGridViewBehavior', [...] to your config/main.php and paste the following code to your behaviors() method of your model\n\n```php\npublic function behaviors() {\n       return array(\n           'ZRememberGridViewBehavior' =\u003e array(\n               'class' =\u003e 'application.components.ZRememberGridViewBehavior',\n\t\t\t   'defaults'=\u003earray(),           /* optional line */\n\t\t\t   'defaultStickOnClear'=\u003efalse   /* optional line */\n           ),\n       );\n}\n```\n\nStep 2\n---------\n\n**Your actionAdmin() must not use unsetAttributes() as this was moved to the extension.**\n\nWith this extension the actionAdmin instead of the classic\n```php\n        public function actionAdmin()\n        {\n                $model=new Company('search');\n                $model-\u003eunsetAttributes();  // clear any default values\n                if(isset($_GET['Company']))\n                        $model-\u003eattributes=$_GET['Company'];\n                $this-\u003erender('admin',array(\n                        'model'=\u003e$model,\n                ));\n        }\n```\n\ncan be as simple as:\n```php\n        public function actionAdmin()\n        {\n                $model=new Company('search');\n                $this-\u003erender('admin',array(\n                        'model'=\u003e$model,\n                ));\n        }\n```\n\nAdvanced Functionalities\n----------------------------------\n\n_(if you use these functionalities please Donate)_\n\n- **'defaults'** is a key value pair array, that will hold the defaults for your filters. \nFor example when you initially want to display `active products`, you set to `array('status'=\u003e'1')`. \nYou can of course put multiple default values in the array.\n\n- **'defaultStickOnClear'=\u003etrue** can be used, if you want the default values to be put back when the user clears the filters\nThe default set is `false` so if the user clears the filters, also the defaults are cleared out, the user will get an absolutely clean filter form. When `true`, if the form is cleared, he will get a form with defaults values.\n\n\nScenarios\n--------------\n\n_(if you use these functionalities please Donate)_\n\nYou can use `scenarios` to remember the filters on multiple states of the same model. This is helpful when you use the same model on different views and you want to remember the state separated from each other.  \nKnown limitations: the views must be in different actions (not on the same view)  \n\nTo set a scenario add the setRememberScenario call after the instantiation  \nSample code:  \n```php\n        public function actionAdmin()\n        {\n                $model=new Company('search');\n\t\t\t\t$model-\u003esetRememberScenario('scene1');\n                $this-\u003erender('admin',array(\n                        'model'=\u003e$model,\n                ));\n        }\n````\n\n\nThis extension has also a pair [Clear Filters Gridview](http://www.yiiframework.com/extension/clear-filters-gridview \"http://www.yiiframework.com/extension/clear-filters-gridview\")\n\nremember, filters, cgridview, gridview, store, reload, controller, model, behavior, interface, widget, stick, scenario\n\nChange Log \n-----------------\n\n[CHANGELOG.md](http://github.com/zmiftah/yii-remember-gridview/blob/master/CHANGELOG.md)\n\nContributing\n------------\n\n1. Fork it.\n2. Create a branch (`git checkout -b my_enhancement_name`)\n3. Commit your changes (`git commit -am \"Added Sorting\"`)\n4. Push to the branch (`git push origin my_enhancement_name`)\n5. Open a [Pull Request][1]\n6. Enjoy a refreshing Diet Coke and wait\n\n[1]: http://github.com/zmiftah/yii-remember-gridview/pulls","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumaninitiative%2Fyii-remember-gridview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhumaninitiative%2Fyii-remember-gridview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumaninitiative%2Fyii-remember-gridview/lists"}