derralf / silverstripe-gridfieldtogglevisibility
quickly toggle hidden status from gridfield
Installs: 125
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:silverstripe-vendormodule
Requires
- silverstripe/framework: ~4.0
- silverstripe/vendor-plugin: ^1.0
This package is auto-updated.
Last update: 2025-03-06 11:19:58 UTC
README
Simple experimental Module to provide Gridfeld Actions to easy toggle a Boolean Field (eg "Hidden", or "Active")
Private project, no help/support provided
Requirements
- SilverStripe ^4.1
Installation
- Install the module via Composer
composer require derralf/silverstripe-gridfieldtogglevisibility
Requirements
A boolean field on the target object, eg. "Hidden", "Active", "Visible", etc
Configuration
If you use a "negative field" (e.g. "Hidden", "Hide") use GridFieldToggleHiddenAction
# as param use "Hidden", "Hide" or wahtever your boolean field is named
# defaults to "Hidden" if no param is provided
$MyGridfieldConfig->addComponent(new GridFieldToggleHiddenAction('Hidden'));
If you use a "positive field" (e.g. "Active", "Visible") use GridFieldToggleActiveAction
# as param use "Active", "Vidible" or wahtever your boolean field is named
# defaults to "Active" if no param is provided
$MyGridfieldConfig->addComponent(new GridFieldToggleActiveAction('Active'));