| Total Complexity | 4 | 
| Total Lines | 67 | 
| Duplicated Lines | 0 % | 
| Coverage | 100% | 
| Changes | 0 | ||
| 1 | <?php | ||
| 14 | class TestimonialCategory extends DataObject | ||
| 15 | { | ||
| 16 | /** | ||
| 17 | * @var string | ||
| 18 | */ | ||
| 19 | private static $singular_name = 'Testimonial Category'; | ||
|  | |||
| 20 | |||
| 21 | /** | ||
| 22 | * @var string | ||
| 23 | */ | ||
| 24 | private static $plural_name = 'Testimonial Categories'; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * @var string | ||
| 28 | */ | ||
| 29 | private static $table_name = 'TestimonialCategory'; | ||
| 30 | |||
| 31 | /** | ||
| 32 | * @var array | ||
| 33 | */ | ||
| 34 | private static $db = [ | ||
| 35 | 'Title' => 'Varchar(255)', | ||
| 36 | ]; | ||
| 37 | |||
| 38 | /** | ||
| 39 | * @var array | ||
| 40 | */ | ||
| 41 | private static $belongs_many_many = [ | ||
| 42 | 'Testimonials' => Testimonial::class, | ||
| 43 | 'TestimonialElements' => ElementTestimonials::class, | ||
| 44 | ]; | ||
| 45 | |||
| 46 | /** | ||
| 47 | * @param null $member | ||
| 48 | * @param array $context | ||
| 49 | * @return bool | ||
| 50 | */ | ||
| 51 | 1 | public function canCreate($member = null, $context = []) | |
| 54 | } | ||
| 55 | |||
| 56 | /** | ||
| 57 | * @param null $member | ||
| 58 | * @return bool | ||
| 59 | */ | ||
| 60 | 1 | public function canEdit($member = null) | |
| 61 |     { | ||
| 62 | 1 | return Testimonial::singleton()->canEdit($member); | |
| 63 | } | ||
| 64 | |||
| 65 | /** | ||
| 66 | * @param null $member | ||
| 67 | * @return bool | ||
| 68 | */ | ||
| 69 | 1 | public function canDelete($member = null) | |
| 72 | } | ||
| 73 | |||
| 74 | /** | ||
| 75 | * @param null $member | ||
| 76 | * @return bool | ||
| 77 | */ | ||
| 78 | 12 | public function canView($member = null) | |
| 81 | } | ||
| 82 | } | ||
| 83 |