Completed
Push — master ( 40658a...92c813 )
by Julito
12:23
created

ResourceSettings::setAllowDownloadAll()   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
    public $allowDownloadAll;
17
18
    public function __construct()
19
    {
20
        $this->allowNodeCreation = true;
21
        $this->allowResourceCreation = true;
22
        $this->allowResourceUpload = true;
23
        $this->allowResourceEdit = true;
24
        $this->allowDownloadAll = false;
25
    }
26
27
    public function isAllowNodeCreation(): bool
28
    {
29
        return $this->allowNodeCreation;
30
    }
31
32
    public function setAllowNodeCreation(bool $allowNodeCreation): ResourceSettings
33
    {
34
        $this->allowNodeCreation = $allowNodeCreation;
35
36
        return $this;
37
    }
38
39
    public function isAllowResourceCreation(): bool
40
    {
41
        return $this->allowResourceCreation;
42
    }
43
44
    public function setAllowResourceCreation(bool $allowResourceCreation): ResourceSettings
45
    {
46
        $this->allowResourceCreation = $allowResourceCreation;
47
48
        return $this;
49
    }
50
51
    public function isAllowResourceUpload(): bool
52
    {
53
        return $this->allowResourceUpload;
54
    }
55
56
    public function setAllowResourceUpload(bool $allowResourceUpload): ResourceSettings
57
    {
58
        $this->allowResourceUpload = $allowResourceUpload;
59
60
        return $this;
61
    }
62
63
    public function isAllowResourceEdit(): bool
64
    {
65
        return $this->allowResourceEdit;
66
    }
67
68
    public function setAllowResourceEdit(bool $allowResourceEdit): ResourceSettings
69
    {
70
        $this->allowResourceEdit = $allowResourceEdit;
71
72
        return $this;
73
    }
74
75
    /**
76
     * @return bool
77
     */
78
    public function isAllowDownloadAll(): bool
79
    {
80
        return $this->allowDownloadAll;
81
    }
82
83
    /**
84
     * @param bool $allowDownloadAll
85
     *
86
     * @return ResourceSettings
87
     */
88
    public function setAllowDownloadAll(bool $allowDownloadAll): ResourceSettings
89
    {
90
        $this->allowDownloadAll = $allowDownloadAll;
91
92
        return $this;
93
    }
94
95
96
}
97