Completed
Push — master ( eb716b...911538 )
by Julito
15:40
created

ResourceSettings::setAllowResourceUpload()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\CoreBundle\Component\Utils;
5
6
class ResourceSettings
7
{
8
    /** @var bool */
9
    public $allowNodeCreation;
10
    /** @var bool */
11
    public $allowResourceCreation;
12
    /** @var bool */
13
    public $allowResourceUpload;
14
    /** @var bool */
15
    public $allowResourceEdit;
16
17
    public function __construct()
18
    {
19
        $this->allowNodeCreation = true;
20
        $this->allowResourceCreation = true;
21
        $this->allowResourceUpload = true;
22
        $this->allowResourceEdit = true;
23
    }
24
25
    /**
26
     * @return bool
27
     */
28
    public function isAllowNodeCreation(): bool
29
    {
30
        return $this->allowNodeCreation;
31
    }
32
33
    /**
34
     * @param bool $allowNodeCreation
35
     *
36
     * @return ResourceSettings
37
     */
38
    public function setAllowNodeCreation(bool $allowNodeCreation): ResourceSettings
39
    {
40
        $this->allowNodeCreation = $allowNodeCreation;
41
42
        return $this;
43
    }
44
45
    /**
46
     * @return bool
47
     */
48
    public function isAllowResourceCreation(): bool
49
    {
50
        return $this->allowResourceCreation;
51
    }
52
53
    /**
54
     * @param bool $allowResourceCreation
55
     *
56
     * @return ResourceSettings
57
     */
58
    public function setAllowResourceCreation(bool $allowResourceCreation): ResourceSettings
59
    {
60
        $this->allowResourceCreation = $allowResourceCreation;
61
62
        return $this;
63
    }
64
65
    /**
66
     * @return bool
67
     */
68
    public function isAllowResourceUpload(): bool
69
    {
70
        return $this->allowResourceUpload;
71
    }
72
73
    /**
74
     * @param bool $allowResourceUpload
75
     *
76
     * @return ResourceSettings
77
     */
78
    public function setAllowResourceUpload(bool $allowResourceUpload): ResourceSettings
79
    {
80
        $this->allowResourceUpload = $allowResourceUpload;
81
82
        return $this;
83
    }
84
85
    /**
86
     * @return bool
87
     */
88
    public function isAllowResourceEdit(): bool
89
    {
90
        return $this->allowResourceEdit;
91
    }
92
93
    /**
94
     * @param bool $allowResourceEdit
95
     *
96
     * @return ResourceSettings
97
     */
98
    public function setAllowResourceEdit(bool $allowResourceEdit): ResourceSettings
99
    {
100
        $this->allowResourceEdit = $allowResourceEdit;
101
102
        return $this;
103
    }
104
}
105