Completed
Push — master ( 583069...b4e9ea )
by Julito
15:30
created

ResourceSettings::setAllowResourceUploadCreation()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
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 $allowNodeFolderCreation;
10
    /** @var bool */
11
    public $allowResourceContentCreation;
12
    /** @var bool */
13
    public $allowResourceUploadCreation;
14
    /** @var bool */
15
    public $allowEditResource;
16
17
    public function __construct()
18
    {
19
        $this->allowNodeFolderCreation = true;
20
        $this->allowResourceContentCreation = true;
21
        $this->allowResourceUploadCreation = true;
22
        $this->allowEditResource = true;
23
    }
24
25
    /**
26
     * @return bool
27
     */
28
    public function isAllowNodeFolderCreation(): bool
29
    {
30
        return $this->allowNodeFolderCreation;
31
    }
32
33
    /**
34
     * @param bool $allowNodeFolderCreation
35
     *
36
     * @return ResourceSettings
37
     */
38
    public function setAllowNodeFolderCreation(bool $allowNodeFolderCreation): ResourceSettings
39
    {
40
        $this->allowNodeFolderCreation = $allowNodeFolderCreation;
41
42
        return $this;
43
    }
44
45
    /**
46
     * @return bool
47
     */
48
    public function isAllowResourceContentCreation(): bool
49
    {
50
        return $this->allowResourceContentCreation;
51
    }
52
53
    /**
54
     * @param bool $allowResourceContentCreation
55
     *
56
     * @return ResourceSettings
57
     */
58
    public function setAllowResourceContentCreation(bool $allowResourceContentCreation): ResourceSettings
59
    {
60
        $this->allowResourceContentCreation = $allowResourceContentCreation;
61
62
        return $this;
63
    }
64
65
    /**
66
     * @return bool
67
     */
68
    public function isAllowResourceUploadCreation(): bool
69
    {
70
        return $this->allowResourceUploadCreation;
71
    }
72
73
    /**
74
     * @param bool $allowResourceUploadCreation
75
     *
76
     * @return ResourceSettings
77
     */
78
    public function setAllowResourceUploadCreation(bool $allowResourceUploadCreation): ResourceSettings
79
    {
80
        $this->allowResourceUploadCreation = $allowResourceUploadCreation;
81
82
        return $this;
83
    }
84
85
    /**
86
     * @return bool
87
     */
88
    public function isAllowEditResource(): bool
89
    {
90
        return $this->allowEditResource;
91
    }
92
93
    /**
94
     * @param bool $allowEditResource
95
     *
96
     * @return ResourceSettings
97
     */
98
    public function setAllowEditResource(bool $allowEditResource): ResourceSettings
99
    {
100
        $this->allowEditResource = $allowEditResource;
101
102
        return $this;
103
    }
104
}
105