Save the current list setup and filter values for all ListControllers. Interface is provided via a custom filter widget and is automatically added to all ListControllers that allow list setup and/or filters
Requirements
- OctoberCMS 3.x
composer require sixgweb/listsaver-plugin
Add the plugin to your project via the OctoberCMS Market Place.
php artisan project:sync
In the Backend, visit Settings->System Updates->Install Packages press the Sync Project button.
User can access ListSaver and save/load their private lists or public lists (if sharing enabled and has permission). Users can always delete their own lists.
User can set lists as public/private when saving, if list sharing enabled.
User can access ListSaver settings
Allow users with permission to set list as public or private. Other users will see all public lists.
When Exporting List Results, use the selected ListSaver value as the export filename.
Once your list setup and filters are in place, press the List Saver button, name your list and press save. If list sharing is enabled and you have permission, click the gear icon to set list to public/private before saving.
Click the list saver button and select from your currently saved lists. If list sharing is enabled, you will see all public lists.
Opportunity for 3rd party developers to modify the preferences query.
Event::listen('sixgweb.listsaver.listSaverPreferencesQuery', function (&$query) {
$query->whereNotIn('id', $this->getUserIgnoreListSaverPreferences());
});
Opportunity for other plugins to extend the scope query
Event::listen('sixgweb.listsaver.applyScopeToQuery', function ($listSaverWidget, $preference, $query) {
$ids = $preference->list['checked'] ?? [];
if (!empty($ids)) {
$query->whereIn('id', $ids);
}
});