nathancox / silverstripe-customhtmleditorfield

A couple of hacks to allow per-editor content styles and TinyMCE configurations in SilverStripe 3
16 stars 8 forks source link

Have setters return field, for invocation chaining #20

Closed bcairns closed 6 years ago

bcairns commented 6 years ago

Allows for invocation chaining on field creation, eg your example could be written as:

$fields->addFieldToTab('Root.Footer', 
  HtmlEditorField::create('FooterText', 'Footer')
    ->setEditorConfig('footer')
    ->setBodyClass('footer-content');
);
nathancox commented 6 years ago

Thanks!