Search

Background: Article on providers .

I want to create an extension that provides a custom, editable datasources which only extends the core section datasource (like adding a few lines to the constructor or the execute method).

Such a datasource would only overwrite the getTemplate-method, but still use the default editor UI from the datasource it extends. However, the implementation right now insists on calling the custom buildEditor-method, which overwrites the default UI.

Also no need to overwrite validate, prepare and the other methods from the interface.

Any ideas?

I guess it should be possible; don't see why not.

I guess it should be possible; don't see why not.

Edited my first post to be more clear. At least it doesn't work using the recommended way (providers, interface), so my real question is, could/should this be changed in future releases, or are there any known workarounds?

Would make much more sense to me if the core datasources and events implemented the same interfaces (iDatasource, iEvent).

If you just need to extend a core DS, then just extend it as an extension. The Providers allows a more customised way of working, but is by no means the only way to do it.

Many of the previous extensions with datasources just extended the core Datasource class, so just require your base file and extend away!

Many of the previous extensions with datasources just extended the core Datasource class, so just require your base file and extend away!

Thanks, will try that.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details