PHP code example of xddesigners / grid-field-styling
1. Go to this page and download the library: Download xddesigners/grid-field-styling library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
xddesigners / grid-field-styling example snippets
// Configure the gridfield filter form to always show
$gridField->visibleFilterForm();
// Set the gridfield to a dense format
$gridField->denseGrid();
// Removes the GridField_ActionMenu and the class 'grid-field__icon-action--hidden-on-hover'
$gridField->unhideActions();
// Add color to a single column in the row
$gridField->coloredColumn('NameOfColomnToColor');
// Add color to a row by the value of a colomn
$gridField->coloredRows('NameOfColomnThatDeterminesRowColor');
// These methods can also be chained together
$gridField
->visibleFilterForm()
->denseGrid();