Completed
Push — development ( 5025e7...b32421 )
by Torben
04:56
created

Category::setTitle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
ccs 3
cts 3
cp 1
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
namespace DERHANSEN\SfBanners\Domain\Model;
3
4
/*
5
 * This file is part of the TYPO3 CMS project.
6
 *
7
 * It is free software; you can redistribute it and/or modify it under
8
 * the terms of the GNU General Public License, either version 2
9
 * of the License, or any later version.
10
 *
11
 * For the full copyright and license information, please read the
12
 * LICENSE.txt file that was distributed with this source code.
13
 *
14
 * The TYPO3 project - inspiring people to share!
15
 */
16
17
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
18
19
/**
20
 * Category
21
 *
22
 * @author Torben Hansen <[email protected]>
23
 */
24
class Category extends AbstractEntity
25
{
26
27
    /**
28
     * Title
29
     *
30
     * @var string
31
     * @validate NotEmpty
32
     */
33
    protected $title;
34
35
    /**
36
     * parent
37
     *
38
     * @var \DERHANSEN\SfBanners\Domain\Model\Category
39
     */
40
    protected $parent;
41
42
    /**
43
     * Returns the title
44
     *
45
     * @return string $title
46
     */
47 1
    public function getTitle()
48
    {
49 1
        return $this->title;
50
    }
51
52
    /**
53
     * Sets the title
54
     *
55
     * @param string $title
56
     * @return void
57
     */
58 1
    public function setTitle($title)
59
    {
60 1
        $this->title = $title;
61 1
    }
62
63
    /**
64
     * Returns the parent
65
     *
66
     * @return \DERHANSEN\SfBanners\Domain\Model\Category $parent
67
     */
68 1
    public function getParent()
69
    {
70 1
        return $this->parent;
71
    }
72
73
    /**
74
     * Sets the parent
75
     *
76
     * @param \DERHANSEN\SfBanners\Domain\Model\Category $parent
77
     * @return void
78
     */
79 1
    public function setParent(Category $parent)
80
    {
81 1
        $this->parent = $parent;
82 1
    }
83
84
}
85