21
21
class TaggableBehavior extends Behavior
22
22
{
23
23
/**
24
- * @var boolean
24
+ * @var boolean whether to return the tag names as array instead of string
25
25
*/
26
26
public $ tagNamesAsArray = false ;
27
27
/**
28
- * @var string
28
+ * @var string the tags relation name
29
29
*/
30
30
public $ tagRelation = 'tags ' ;
31
31
/**
32
- * @var string
32
+ * @var string the tags model name attribute name
33
33
*/
34
34
public $ tagNameAttribute = 'name ' ;
35
35
/**
36
- * @var string|false
36
+ * @var string|false the tags model frequency attribute name
37
37
*/
38
38
public $ tagFrequencyAttribute = 'frequency ' ;
39
39
/**
@@ -55,6 +55,7 @@ public function events()
55
55
}
56
56
57
57
/**
58
+ * Returns the tag names.
58
59
* @param boolean|null $asArray
59
60
* @return string|string[]
60
61
*/
@@ -78,6 +79,7 @@ public function getTagNames($asArray = null)
78
79
}
79
80
80
81
/**
82
+ * Sets the tag names.
81
83
* @param string|string[] $names
82
84
*/
83
85
public function setTagNames ($ names )
@@ -86,6 +88,7 @@ public function setTagNames($names)
86
88
}
87
89
88
90
/**
91
+ * Adds the tag names.
89
92
* @param string|string[] $names
90
93
*/
91
94
public function addTagNames ($ names )
@@ -94,6 +97,7 @@ public function addTagNames($names)
94
97
}
95
98
96
99
/**
100
+ * Removes the tag names.
97
101
* @param string|string[] $names
98
102
*/
99
103
public function removeTagNames ($ names )
@@ -102,6 +106,7 @@ public function removeTagNames($names)
102
106
}
103
107
104
108
/**
109
+ * Returns a value indicating whether the tag names exists.
105
110
* @param string|string[] $names
106
111
* @return boolean
107
112
*/
@@ -206,6 +211,7 @@ public function beforeDelete()
206
211
}
207
212
208
213
/**
214
+ * Filters the tag names.
209
215
* @param string|string[] $names
210
216
* @return string[]
211
217
*/
0 commit comments