Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

zirak/linkable-dataobjects


Go to End


3 Posts   839 Views

Avatar
timo

Community Member, 47 Posts

28 August 2014 at 9:06pm

Hi!

I am trying to get zirak/linkable-dataobjects to work with my silverstripe 3.1 environment without any luck.
Several Questions:
Does this module has to be installed with composer?
Does this module has a dependence to zirak/searchable-dataobjects module or can it be used as it is?

Have been trying to setup that for several hours.
Also tried to use composer for the first time. (many problems......)

what i get when i put the sample code provided at github zirak/linkable-dataobjects into my site/code is:

PHP Fatal error:  Class DoNews contains 3 abstract methods and must therefore be declared abstract or implement the remaining methods (Searchable::getSearchFilter, Searchable::getTitleFields, Searchable::getContentFields) in /Applications/MAMP/htdocs/silverstripe/mysite/code/DoNews.php on line 58

any help is welcome!
timo.

Avatar
Willr

Forum Moderator, 5523 Posts

31 August 2014 at 4:24pm

Have you tried contacting the author of the module directly? Looks like support includes 3.1 so should work.

Avatar
timo

Community Member, 47 Posts

31 August 2014 at 7:25pm

Edited: 31/08/2014 7:26pm

Hi Willr

Sometimes copy and paste is not the way.
After reading the introduction again on github it was clear:

Make the DataObject implement Linkable interface (you need to implement Link(), LinkLabel(), link_shortcode_handler():

class DoNews extends DataObject implements Searchable {

but:

class DoNews extends DataObject implements Linkable {

works now. (Shame on me.)
thanks. timo.