Issues (35)

src/Model/TestimonialCategory.php (9 issues)

1
<?php
2
3
namespace Dynamic\Elements\Model;
4
5
use Dynamic\Elements\Elements\ElementTestimonials;
6
use SilverStripe\ORM\DataObject;
7
8
/**
9
 * Class TestimonialCategory
10
 * @package Dynamic\Elements\Model
11
 *
12
 * @property string $Title
13
 */
14
class TestimonialCategory extends DataObject
15
{
16
    /**
17
     * @var string
18
     */
19
    private static $singular_name = 'Category';
0 ignored issues
show
The private property $singular_name is not used, and could be removed.
Loading history...
20
21
    /**
22
     * @var string
23
     */
24
    private static $plural_name = 'Categories';
0 ignored issues
show
The private property $plural_name is not used, and could be removed.
Loading history...
25
26
    /**
27
     * @var string
28
     */
29
    private static $table_name = 'TestimonialCategory';
0 ignored issues
show
The private property $table_name is not used, and could be removed.
Loading history...
30
31
    /**
32
     * @var array
33
     */
34
    private static $db = [
0 ignored issues
show
The private property $db is not used, and could be removed.
Loading history...
35
        'Title' => 'Varchar(255)',
36
    ];
37
38
    /**
39
     * @var array
40
     */
41
    private static $belongs_many_many = [
0 ignored issues
show
The private property $belongs_many_many is not used, and could be removed.
Loading history...
42
        'Testimonials' => Testimonial::class,
43
        'TestimonialElements' => ElementTestimonials::class,
44
    ];
45
46
    /**
47
     * @param null $member
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $member is correct as it would always require null to be passed?
Loading history...
48
     * @param array $context
49
     * @return bool
50
     */
51 1
    public function canCreate($member = null, $context = [])
52
    {
53 1
        return Testimonial::singleton()->canCreate($member, $context);
54
    }
55
56
    /**
57
     * @param null $member
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $member is correct as it would always require null to be passed?
Loading history...
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
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $member is correct as it would always require null to be passed?
Loading history...
67
     * @return bool
68
     */
69 1
    public function canDelete($member = null)
70
    {
71 1
        return Testimonial::singleton()->canDelete($member);
72
    }
73
74
    /**
75
     * @param null $member
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $member is correct as it would always require null to be passed?
Loading history...
76
     * @return bool
77
     */
78 4
    public function canView($member = null)
79
    {
80 4
        return true;
81
    }
82
}
83