unclecheese / silverstripe-dashboard

Dashboard module for SilverStripe 3
GNU General Public License v2.0
46 stars 35 forks source link

Drop the requirement for CMS? #88

Open Taitava opened 6 years ago

Taitava commented 6 years ago

Hi,

could it be possible to remove CMS from the dependencies in composer.json? I would like to use this module in a project that does not need a CMS at all. Now I'm using it and removing all the CMS related buttons from the backend, but it feels a little unnecessary to have the cms module installed when it's not needed. :)

This module has a few DashboardPanels that are related to the CMS module, so perhaps those classes could be wrapped with something like this:

if (class_exists('CMSMain') {
    class DashboardRecentEditsPanel extends DashboardPanel {
        ...
    }
}

Would there be any other changes needed? I think I could make a PR if you are interested in this.

Thanks!

Taitava commented 6 years ago

Just for record: I just noticed that @NobrainerWeb has done removing just the dependency from composer.json in his own fork. But this does not include disabling the CMS dependent DashboardPanel classes. I guess it works as long as no user tries to create one of those panels :).

But anyway, I would still be interested to have a more complete solution for this. :)