Silverstripe Version: 4.1
Question:
I’m trying to add an extension to the File class as follows:
class FileExtension extends DataExtension
{
private static $db = array(
'Copyright' => 'Varchar(255)'
);
public function updateCMSFields(FieldList $fields) {
$fields->insertAfter(
'Title',
TextField::create('Copyright', 'Copyright')
);
}
}
registered the extension in mysite.yml:
Silverstripe\Assets\File:
extensions:
- FileExtension
Upon running /dev/build, the ‘Copyright’ field is created as expected, but when opening a file in the CMS, the corresponding TextField isn’t rendered.
In fact, my updateCMSFields method doesn’t even get called (tried putting a ‘die()’ statement in there).
Something i missed?