Completed
Push — master ( f67c92...339b0b )
by Julito
15:21
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
15
    public function __construct()
16
    {
17
        $this->allowNodeFolderCreation = true;
18
        $this->allowResourceContentCreation = true;
19
        $this->allowResourceUploadCreation = true;
20
    }
21
22
    /**
23
     * @return bool
24
     */
25
    public function isAllowNodeFolderCreation(): bool
26
    {
27
        return $this->allowNodeFolderCreation;
28
    }
29
30
    /**
31
     * @param bool $allowNodeFolderCreation
32
     *
33
     * @return ResourceSettings
34
     */
35
    public function setAllowNodeFolderCreation(bool $allowNodeFolderCreation): ResourceSettings
36
    {
37
        $this->allowNodeFolderCreation = $allowNodeFolderCreation;
38
39
        return $this;
40
    }
41
42
    /**
43
     * @return bool
44
     */
45
    public function isAllowResourceContentCreation(): bool
46
    {
47
        return $this->allowResourceContentCreation;
48
    }
49
50
    /**
51
     * @param bool $allowResourceContentCreation
52
     *
53
     * @return ResourceSettings
54
     */
55
    public function setAllowResourceContentCreation(bool $allowResourceContentCreation): ResourceSettings
56
    {
57
        $this->allowResourceContentCreation = $allowResourceContentCreation;
58
59
        return $this;
60
    }
61
62
    /**
63
     * @return bool
64
     */
65
    public function isAllowResourceUploadCreation(): bool
66
    {
67
        return $this->allowResourceUploadCreation;
68
    }
69
70
    /**
71
     * @param bool $allowResourceUploadCreation
72
     *
73
     * @return ResourceSettings
74
     */
75
    public function setAllowResourceUploadCreation(bool $allowResourceUploadCreation): ResourceSettings
76
    {
77
        $this->allowResourceUploadCreation = $allowResourceUploadCreation;
78
79
        return $this;
80
    }
81
82
}
83