PHPackages                             exadium/gridfield-icon-row-class - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. exadium/gridfield-icon-row-class

ActiveSilverstripe-module[Utility &amp; Helpers](/categories/utility)

exadium/gridfield-icon-row-class
================================

SilverStripe module to add (fontawesome) icons and classes to rows in GridFields

8935PHP

Since Oct 26Pushed 9y ago1 watchersCompare

[ Source](https://github.com/marijnkampf/gridfield-icon-row-class)[ Packagist](https://packagist.org/packages/exadium/gridfield-icon-row-class)[ RSS](/packages/exadium-gridfield-icon-row-class/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

GridField Icon and Row Class
============================

[](#gridfield-icon-and-row-class)

Adds icons and CSS row classes to DataObjects displayed in GridFields. Enables styling of rows depending on conditions. Example at bottom of README.md uses different colours for rows.

[![Screenshot of sample Members GridField with group icons and coloured coded rows](https://camo.githubusercontent.com/fbbe525fa4638fad0bfe33ba7b2cf4b473a9c162b2f1732ac6f5411364d23bd0/687474703a2f2f7777772e6578616469756d2e636f6d2f6173736574732f65787465726e616c2f73696c7665727374726970652d677269646669656c642d69636f6e2d726f772d636c6173732d6d6f64756c652e706e67)](https://camo.githubusercontent.com/fbbe525fa4638fad0bfe33ba7b2cf4b473a9c162b2f1732ac6f5411364d23bd0/687474703a2f2f7777772e6578616469756d2e636f6d2f6173736574732f65787465726e616c2f73696c7665727374726970652d677269646669656c642d69636f6e2d726f772d636c6173732d6d6f64756c652e706e67)

Maintainer Contact
------------------

[](#maintainer-contact)

- Marijn Kampf ([Exadium](https://github.com/marijnkampf/GridField-Icon-Row-Class))

Requirements
------------

[](#requirements)

- SilverStripe CMS 3.1.x or
- SilverStripe CMS 3.2.x

Installation
------------

[](#installation)

- composer require "exadium/gridfield-icon-row-class": "dev-master"

Usage
-----

[](#usage)

The example below adds icons for Members in the Administrators and Content Authors groups in the Security page of the default SilverStripe CMS installation. It also adds colour (using CSS class) to Member rows depending on their group. Note that the order of the CSS declarations ensures that high priority colours are shown even when multiple groups are assigned.

mysite/\_config/config.yml

```
Member:
  extensions:
    - CustomMember
    - DataObjectIconRowClassExtension

```

mysite/code/CustomMembers.php

```
