mirror of
https://github.com/silverstripe/silverstripe-widgets
synced 2024-10-22 17:05:54 +02:00
Merge pull request #164 from creative-commoners/pulls/2.0/return-null-for-empty-null
API Remove overriding function getTitle()
This commit is contained in:
commit
76b8b3f891
@ -11,6 +11,7 @@ use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\HiddenField;
|
||||
use SilverStripe\Forms\TextField;
|
||||
use SilverStripe\ORM\DataObject;
|
||||
use SilverStripe\ORM\FieldType\DBHTMLText;
|
||||
use SilverStripe\Versioned\Versioned;
|
||||
|
||||
/**
|
||||
@ -48,11 +49,6 @@ class Widget extends DataObject
|
||||
|
||||
private static $default_sort = "\"Sort\"";
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private static $title = "Widget Title";
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
@ -123,17 +119,6 @@ class Widget extends DataObject
|
||||
return $this->renderWith(array_reverse(ClassInfo::ancestry(__CLASS__)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the frontend title for this widget
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTitle()
|
||||
{
|
||||
return $this->getField('Title')
|
||||
?: _t(__CLASS__ . '.TITLE', $this->config()->get('title'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
@ -9,6 +9,5 @@ class TestWidget extends Widget implements TestOnly
|
||||
{
|
||||
private static $table_name = 'WidgetAreaEditorTest_TestWidget';
|
||||
private static $cmsTitle = "Test widget";
|
||||
private static $title = "Test widget";
|
||||
private static $description = "Test widget";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user