Skip to content

Commit a76fb9c

Browse files
authored
Remove getType() override, add singular_name and plural_name
* REFACTOR: Remove getType() override to allow extensibility - Removed getType() method override - Updated $singular_name from 'Testimonials Element' to 'Testimonials' - Updated $plural_name from 'Testimonials Elements' to 'Testimonials Blocks' This allows sites to customize the element's display name via extensions by setting $singular_name. Fixes #31 Related: dynamic/silverstripe-essentials-tools#68 * Address review: use 'Testimonials' for both singular and plural (collective noun)
1 parent 9b553d3 commit a76fb9c

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/Elements/ElementTestimonials.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ class ElementTestimonials extends BaseElement
2929
/**
3030
* @var string
3131
*/
32-
private static $singular_name = 'Testimonials Element';
32+
private static $singular_name = 'Testimonials';
3333

3434
/**
3535
* @var string
3636
*/
37-
private static $plural_name = 'Testimonials Elements';
37+
private static $plural_name = 'Testimonials';
3838

3939
/**
4040
* @var string
@@ -95,14 +95,6 @@ protected function provideBlockSchema()
9595
return $blockSchema;
9696
}
9797

98-
/**
99-
* @return string
100-
*/
101-
public function getType()
102-
{
103-
return _t(__CLASS__ . '.BlockType', 'Testimonials');
104-
}
105-
10698
/**
10799
* @return FieldList
108100
*/

0 commit comments

Comments
 (0)