1 | <?php |
||
14 | class TaskManagerElementType extends BaseElementType |
||
15 | { |
||
16 | /** |
||
17 | * Returns the element type name. |
||
18 | * |
||
19 | * @return string |
||
20 | */ |
||
21 | public function getName() |
||
25 | |||
26 | /** |
||
27 | * Returns whether this element type has content. |
||
28 | * |
||
29 | * @return bool |
||
30 | */ |
||
31 | public function hasContent() |
||
35 | |||
36 | /** |
||
37 | * Returns whether this element type has titles. |
||
38 | * |
||
39 | * @return bool |
||
40 | */ |
||
41 | public function hasTitles() |
||
45 | |||
46 | /** |
||
47 | * Returns whether this element type has statuses. |
||
48 | * |
||
49 | * @return bool |
||
50 | */ |
||
51 | public function hasStatuses() |
||
55 | |||
56 | /** |
||
57 | * Returns this element's statuses. |
||
58 | * |
||
59 | * @return array |
||
60 | */ |
||
61 | public function getStatuses() |
||
69 | |||
70 | /** |
||
71 | * Return sources. |
||
72 | * |
||
73 | * @param string $context |
||
74 | * |
||
75 | * @return array |
||
76 | */ |
||
77 | public function getSources($context = null) |
||
106 | |||
107 | /** |
||
108 | * @inheritDoc IElementType::getAvailableActions() |
||
109 | * |
||
110 | * @param string|null $source |
||
111 | * |
||
112 | * @return array|null |
||
113 | */ |
||
114 | public function getAvailableActions($source = null) |
||
141 | |||
142 | /** |
||
143 | * @inheritDoc IElementType::defineAvailableTableAttributes() |
||
144 | * |
||
145 | * @return array |
||
146 | */ |
||
147 | public function defineAvailableTableAttributes() |
||
165 | |||
166 | /** |
||
167 | * @inheritDoc IElementType::getDefaultTableAttributes() |
||
168 | * |
||
169 | * @param string|null $source |
||
170 | * |
||
171 | * @return array |
||
172 | */ |
||
173 | public function getDefaultTableAttributes($source = null) |
||
183 | |||
184 | /** |
||
185 | * Get table attribute html. |
||
186 | * |
||
187 | * @param BaseElementModel $element |
||
188 | * @param string $attribute |
||
189 | * |
||
190 | * @return string |
||
191 | */ |
||
192 | public function getTableAttributeHtml(BaseElementModel $element, $attribute) |
||
204 | |||
205 | /** |
||
206 | * Define sortable attributes. |
||
207 | * |
||
208 | * @param string $source |
||
209 | * |
||
210 | * @return array |
||
211 | */ |
||
212 | public function defineSortableAttributes($source = null) |
||
224 | |||
225 | /** |
||
226 | * Defines any custom element criteria attributes for this element type. |
||
227 | * |
||
228 | * @return array |
||
229 | */ |
||
230 | public function defineCriteriaAttributes() |
||
237 | |||
238 | /** |
||
239 | * Modifies an element query targeting elements of this type. |
||
240 | * |
||
241 | * @param DbCommand $query |
||
242 | * @param ElementCriteriaModel $criteria |
||
243 | * |
||
244 | * @return mixed |
||
245 | */ |
||
246 | public function modifyElementsQuery(DbCommand $query, ElementCriteriaModel $criteria) |
||
270 | |||
271 | /** |
||
272 | * Populates an element model based on a query result. |
||
273 | * |
||
274 | * @param array $row |
||
275 | * |
||
276 | * @return array |
||
277 | */ |
||
278 | public function populateElementModel($row) |
||
282 | } |
||
283 |