equal
deleted
inserted
replaced
241 * @return array |
241 * @return array |
242 */ |
242 */ |
243 public function getTagsStr($document) |
243 public function getTagsStr($document) |
244 { |
244 { |
245 $em = $this->getEntityManager(); |
245 $em = $this->getEntityManager(); |
246 $query = $em->createQuery("SELECT t.label FROM WikiTagBundle:DocumentTag dt JOIN dt.tag t WHERE dt.document = :docid"); |
246 $query = $em->createQuery("SELECT t.label FROM WikiTagBundle:DocumentTag dt JOIN dt.tag t WHERE dt.document = :docid ORDER BY dt.tagOrder"); |
247 $query = $query->setParameter("docid", $document); |
247 $query = $query->setParameter("docid", $document); |
248 $result = $query->getScalarResult(); |
248 $result = $query->getScalarResult(); |
249 $tagstr = array(); |
249 $tagstr = array(); |
250 foreach ($result as $res) { |
250 foreach ($result as $res) { |
251 $tagstr[] = $res['label']; |
251 $tagstr[] = $res['label']; |
252 } |
252 } |
253 return $tagstr; |
253 return $tagstr; |
254 } |
254 } |
|
255 |
255 |
256 |
256 /** |
257 /** |
257 * Update a wikitag document tags string. |
258 * Update a wikitag document tags string. |
258 * @param DocumentInterface $document the wikitag document |
259 * @param DocumentInterface $document the wikitag document |
259 */ |
260 */ |