Changeset 1429
- Timestamp:
- Sep 26, 2010, 4:02:16 PM (10 years ago)
- Location:
- cpc/trunk/project
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
cpc/trunk/project/config/doctrine/schema.yml
r1427 r1429 402 402 Solrable: 403 403 description: [Citoyen, commentaire] 404 moretags: [Citoyen, object_type, object_id ]404 moretags: [Citoyen, object_type, object_id, Parlementaires] 405 405 date: created_at 406 406 index_if: is_public -
cpc/trunk/project/lib/model/doctrine/Commentaire.class.php
r1414 r1429 81 81 } 82 82 83 public function getParlementaires() { 84 return Doctrine::getTable('CommentaireObject')->getParlementaires($this->id); 85 } 86 83 87 public function updateNbCommentaires($inc = 0) { 84 88 if ($this->object_type) { -
cpc/trunk/project/lib/model/doctrine/CommentaireObject.class.php
r964 r1429 6 6 class CommentaireObject extends BaseCommentaireObject 7 7 { 8 9 8 } -
cpc/trunk/project/lib/model/doctrine/CommentaireObjectTable.class.php
r964 r1429 24 24 } 25 25 26 public function getParlementaires($commentaire_id) { 27 $pids = $this->createQuery('c')->select('object_id')->where('object_type = "Parlementaire"')->andWhere('commentaire_id = ?', $commentaire_id)->fetchArray(); 28 $ids = array(); 29 foreach ($pids as $id) { 30 array_push($ids, $id['object_id']); 31 } 32 print_r($ids); 33 return Doctrine::getTable('Parlementaire')->createQuery('p')->whereIn('p.id', $ids)->execute(); 34 } 26 35 }
Note: See TracChangeset
for help on using the changeset viewer.