Commit b432c54 1 parent eadd5ad commit b432c54 Copy full SHA for b432c54
File tree 3 files changed +4
-10
lines changed
3 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class MyElement extends BaseElement
22
22
23
23
private static $plural_name = 'my elements';
24
24
25
- private static $description = 'What my custom element does';
25
+ private static $class_description = 'What my custom element does';
26
26
27
27
public function getCMSFields()
28
28
{
Original file line number Diff line number Diff line change @@ -60,11 +60,8 @@ class BaseElement extends DataObject implements CMSPreviewable
60
60
61
61
/**
62
62
* Describe the purpose of this element
63
- *
64
- * @config
65
- * @var string
66
63
*/
67
- private static $ description = 'Base element class ' ;
64
+ private static $ class_description = 'Base element class ' ;
68
65
69
66
/**
70
67
* List of fields to exclude from CMS SiteTree seatch
@@ -1140,10 +1137,7 @@ public function getIcon()
1140
1137
*/
1141
1138
public function getTypeNice ()
1142
1139
{
1143
- $ description = $ this ->config ()->uninherited ('description ' );
1144
- if ($ description ) {
1145
- $ description = _t (__CLASS__ . '.Description ' , $ description );
1146
- }
1140
+ $ description = $ this ->i18nClassDescription ();
1147
1141
$ markup = ($ description ) ? ' <span class="element__note"> — ' . $ description . '</span> ' : '' ;
1148
1142
1149
1143
return DBField::create_field (
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class ElementContent extends BaseElement
23
23
24
24
private static $ plural_name = 'content blocks ' ;
25
25
26
- private static $ description = 'HTML text block ' ;
26
+ private static $ class_description = 'HTML text block ' ;
27
27
28
28
/**
29
29
* Re-title the HTML field to Content
You can’t perform that action at this time.
0 commit comments