Created
January 29, 2019 01:58
-
-
Save wilr/7c59f577e1d072eb66e4c0c84cba6732 to your computer and use it in GitHub Desktop.
Uncaught Error: Call to a member function scaffoldSearchField() on string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use SilverStripe\ORM\DataObject; | |
class TestBlock extends DataObject | |
{ | |
private static $summary_fields = [ | |
'getReadableState' => [ | |
'title' => 'State' | |
] | |
]; | |
/** | |
* @return string | |
*/ | |
public function getReadableState() | |
{ | |
return 'Test'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fix is to return an object explicitly
DBText::create('Test')