Add a column to entries list using defineAdditionalEntryTableAttributes? What I'm looking for is to add in a custom column that either has a checkmark or not based on if the entry's slug has a certain set of characters.

Example:

This would get a check: sluggyslug-SC_01234X

This would not: sluggyslug

I would be looking at the slug and matching via regex for the SC_XXXXX portion.

I see there is the hook defineAdditionalEntryTableAttributes and getEntryTableAttributeHtml but I get an error when I try to set them.

The code I tried in my plugin:

public function defineAdditionalEntryTableAttributes()
{
    return array(
        'something' =&gt; "Some Column",
    );
}

public function getEntryTableAttributeHtml(EntryModel $entry, $attribute)
{
    if ($attribute == 'something')
    {
        if (preg_match("/(?:SC_\w{5})$/", $entry-&gt;slug)) {
          return '&lt;div class="center"&gt;&amp;#x2713;&lt;/div&gt;';
        }
    }
}


If I try to add the column, I just get this via the getElements ajax call.

CException
Property "Craft\EntryModel.something" is not defined.


Is there anyway to add a column like this?
The error points to a missing corresponding field with handle 'something' in the entry model.