public function updateColumns($itemType, &$columns)
    {
        if ($itemType !== 'Pages') {
            return;
        }

        // Check if pages has the tags field
        if (!self::enabled()) {
            return;
        }

        // Set column
        $field = Config::inst()->get(__CLASS__, 'tag_field');
        $columns['Terms'] = [
            'printonly' => true, // Hide on page report
            'title' => _t('SilverStripe\\SiteWideContentReport\\SitewideContentReport.Tags', 'Tags'),
            'datasource' => function ($record) use ($field) {
                $tags = $record->$field()->column('Name');

                return implode(', ', $tags);
            },
        ];
    }
public function updateColumns($itemType, &$columns)
    {
        if ($itemType !== 'Pages') {
            return;
        }

        // Check if pages has the tags field
        if (!self::enabled()) {
            return;
        }

        // Set column
        $field = Config::inst()->get(__CLASS__, 'tag_field');
        $columns['Terms'] = [
            'printonly' => true, // Hide on page report
            'title' => _t('SilverStripe\\SiteWideContentReport\\SitewideContentReport.Tags', 'Tags'),
            'datasource' => function ($record) use ($field) {
                $tags = $record->$field()->column('Name');

                return implode(', ', $tags);
            },
        ];
    }
public function updateColumns ( $ itemType , & $ columns ) { if ( $ itemType !== 'Pages' ) { return ; } // Check if pages has the tags field if ( ! self :: enabled ( ) ) { return ; } // Set column $ field = Config :: inst ( ) -> get ( __CLASS__ , 'tag_field' ) ; $ columns [ 'Terms' ] = [ 'printonly' => true , // Hide on page report 'title' => _t ( 'SilverStripe\\SiteWideContentReport\\SitewideContentReport.Tags' , 'Tags' ) , 'datasource' => function ( $ record ) use ( $ field ) { $ tags = $ record -> $ field ( ) -> column ( 'Name' ) ; return implode ( ', ' , $ tags ) ; } , ] ; }
Update columns to include taxonomy details.

@param string $itemType (i.e 'Pages' or 'Files')
@param array  $columns  Columns
Update columns to include taxonomy details .