Completed
Push — master ( 009411...7fe99b )
by Rafał
18:49 queued 07:10
created

ContentListAction::setContentId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Superdesk Web Publisher Content List Component.
7
 *
8
 * Copyright 2020 Sourcefabric z.ú. and contributors.
9
 *
10
 * For the full copyright and license information, please see the
11
 * AUTHORS and LICENSE files distributed with this source code.
12
 *
13
 * @copyright 2020 Sourcefabric z.ú
14
 * @license http://www.superdesk.org/license
15
 */
16
17
namespace SWP\Component\ContentList\Model;
18
19
class ContentListAction
20
{
21
    public const ACTION_MOVE = 'move';
22
23
    public const ACTION_ADD = 'add';
24
25
    public const ACTION_DELETE = 'delete';
26
27
    /** @var int */
28
    private $position = 0;
29
30
    /** @var bool */
31
    private $sticky = false;
32
33
    /** @var string|null */
34
    private $action;
35
36
    /** @var int */
37
    private $contentId;
38
39
    public function getPosition(): int
40
    {
41
        return $this->position;
42
    }
43
44
    public function setPosition(int $position): void
45
    {
46
        $this->position = $position;
47
    }
48
49
    public function isSticky(): bool
50
    {
51
        return $this->sticky;
52
    }
53
54
    public function setSticky(bool $sticky = false): void
55
    {
56
        $this->sticky = $sticky;
57
    }
58
59
    public function getAction(): ?string
60
    {
61
        return $this->action;
62
    }
63
64
    public function setAction(string $action): void
65
    {
66
        $this->action = $action;
67
    }
68
69
    public function getContentId(): ?int
70
    {
71
        return $this->contentId;
72
    }
73
74
    public function setContentId(int $contentId): void
75
    {
76
        $this->contentId = $contentId;
77
    }
78
}
79