| author | cavaliet |
| Wed, 26 Oct 2011 15:38:05 +0200 | |
| changeset 14 | 673b2766024e |
| parent 3 | 976d922e52f0 |
| child 20 | 985f1992895d |
| permissions | -rwxr-xr-x |
| 2 | 1 |
<?php |
2 |
/* |
|
3 |
* This file is part of the WikiTagBundle package. |
|
4 |
* |
|
5 |
* (c) IRI <http://www.iri.centrepompidou.fr/> |
|
6 |
* |
|
7 |
* For the full copyright and license information, please view the LICENSE |
|
8 |
* file that was distributed with this source code. |
|
9 |
*/ |
|
10 |
||
11 |
namespace IRI\Bundle\WikiTagBundle\Model; |
|
12 |
||
|
14
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
3
diff
changeset
|
13 |
use Doctrine\Common\Collections\ArrayCollection; |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
3
diff
changeset
|
14 |
|
| 3 | 15 |
abstract class Document implements BaseDocumentInterface { |
| 2 | 16 |
|
17 |
/** |
|
18 |
* @var integer $id |
|
19 |
*/ |
|
20 |
protected $id; |
|
21 |
||
22 |
/** |
|
23 |
* @var string $title |
|
24 |
*/ |
|
25 |
protected $title; |
|
26 |
||
27 |
/** |
|
28 |
* @var text $description |
|
29 |
*/ |
|
30 |
protected $description; |
|
31 |
||
32 |
/** |
|
33 |
* @var boolean $manualOrder |
|
34 |
*/ |
|
| 3 | 35 |
protected $manualOrder = false; |
36 |
||
37 |
/** |
|
38 |
* @var string $externalId |
|
39 |
*/ |
|
40 |
protected $externalId; |
|
| 2 | 41 |
|
|
14
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
3
diff
changeset
|
42 |
/** |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
3
diff
changeset
|
43 |
* @var ArrayCollection $tags |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
3
diff
changeset
|
44 |
*/ |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
3
diff
changeset
|
45 |
protected $tags; |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
3
diff
changeset
|
46 |
|
| 2 | 47 |
|
48 |
/** |
|
49 |
* Get id |
|
50 |
* |
|
51 |
* @return integer |
|
52 |
*/ |
|
53 |
public function getId() |
|
54 |
{ |
|
55 |
return $this->id; |
|
56 |
} |
|
57 |
||
58 |
/** |
|
59 |
* Set title |
|
60 |
* |
|
61 |
* @param string $title |
|
62 |
*/ |
|
63 |
public function setTitle($title) |
|
64 |
{ |
|
65 |
$this->title = $title; |
|
66 |
} |
|
67 |
||
68 |
/** |
|
69 |
* Get title |
|
70 |
* |
|
71 |
* @return string |
|
72 |
*/ |
|
73 |
public function getTitle() |
|
74 |
{ |
|
75 |
return $this->title; |
|
76 |
} |
|
77 |
||
78 |
/** |
|
79 |
* Set description |
|
80 |
* |
|
81 |
* @param text $description |
|
82 |
*/ |
|
83 |
public function setDescription($description) |
|
84 |
{ |
|
85 |
$this->description = $description; |
|
86 |
} |
|
87 |
||
88 |
/** |
|
89 |
* Get description |
|
90 |
* |
|
91 |
* @return text |
|
92 |
*/ |
|
93 |
public function getDescription() |
|
94 |
{ |
|
95 |
return $this->description; |
|
96 |
} |
|
97 |
||
98 |
/** |
|
99 |
* Set manualOrder |
|
100 |
* |
|
101 |
* @param boolean $manualOrder |
|
102 |
*/ |
|
103 |
function setManualOrder($manualOrder) |
|
104 |
{ |
|
105 |
$this->manualOrder = $manualOrder; |
|
106 |
} |
|
107 |
||
108 |
/** |
|
109 |
* Get manualOrder |
|
110 |
* |
|
111 |
* @return boolean |
|
112 |
*/ |
|
113 |
function getManualOrder() |
|
114 |
{ |
|
115 |
return $this->manualOrder; |
|
116 |
} |
|
117 |
||
| 3 | 118 |
/** |
119 |
* TODO: (non-PHPdoc) |
|
120 |
* @see IRI\Bundle\WikiTagBundle\Model.BaseDocumentInterface::setExternalId() |
|
121 |
*/ |
|
122 |
function setExternalId($externalId) |
|
123 |
{ |
|
124 |
$this->externalId = $externalId; |
|
125 |
} |
|
126 |
||
127 |
/** |
|
128 |
* TODO: (non-PHPdoc) |
|
129 |
* @see IRI\Bundle\WikiTagBundle\Model.BaseDocumentInterface::getExternalId() |
|
130 |
*/ |
|
131 |
function getExternalId() |
|
132 |
{ |
|
133 |
return $this->externalId; |
|
134 |
} |
|
| 2 | 135 |
|
|
14
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
3
diff
changeset
|
136 |
/** |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
3
diff
changeset
|
137 |
* TODO: (non-PHPdoc) |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
3
diff
changeset
|
138 |
* @see IRI\Bundle\WikiTagBundle\Model.BaseDocumentInterface::getTags() |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
3
diff
changeset
|
139 |
*/ |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
3
diff
changeset
|
140 |
function getTags() |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
3
diff
changeset
|
141 |
{ |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
3
diff
changeset
|
142 |
return $this->tags; |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
3
diff
changeset
|
143 |
} |
|
673b2766024e
Update ORM configuration to allow JOIN between Tag and DocumentTag. TagList template has now the number of documents by tag.
cavaliet
parents:
3
diff
changeset
|
144 |
|
| 2 | 145 |
} |