| @@ 123-133 (lines=11) @@ | ||
| 120 | * @param $id |
|
| 121 | * @return array |
|
| 122 | */ |
|
| 123 | public function getLocation($id) |
|
| 124 | { |
|
| 125 | $critere = new CriteriaCompo(); |
|
| 126 | $critere->add(new Criteria('location_online', 1)); |
|
| 127 | $critere->add(new Criteria('location_type', 'location')); |
|
| 128 | $critere->add(new Criteria('location_pid', $id)); |
|
| 129 | $location = array(); |
|
| 130 | $location = $this->getObjects($critere); |
|
| 131 | ||
| 132 | return $location; |
|
| 133 | } |
|
| 134 | ||
| 135 | /** |
|
| 136 | * @param $id |
|
| @@ 139-148 (lines=10) @@ | ||
| 136 | * @param $id |
|
| 137 | * @return int |
|
| 138 | */ |
|
| 139 | public function haveChild($id) |
|
| 140 | { |
|
| 141 | $critere = new CriteriaCompo(); |
|
| 142 | $critere->add(new Criteria('location_online', 1)); |
|
| 143 | $critere->add(new Criteria('location_type', 'location')); |
|
| 144 | $critere->add(new Criteria('location_pid', $id)); |
|
| 145 | $location = $this->getCount($critere); |
|
| 146 | ||
| 147 | return $location; |
|
| 148 | } |
|
| 149 | } |
|
| 150 | ||