| 92 | | public function getTheme ($pPublicId){ |
|---|
| | 97 | public function getTheme ($pPublicId) { |
|---|
| | 98 | $id = $this->getId($pPublicId); |
|---|
| | 99 | do { |
|---|
| | 100 | $parameters = _daoSp ()->addCondition ('id_helt', '=', $id['id_helt']) |
|---|
| | 101 | ->addCondition ('type_hei', '=', $id['type_hei']); |
|---|
| | 102 | |
|---|
| | 103 | $results = _dao('headingelementinformation')->findBy ($parameters); |
|---|
| | 104 | if ($results[0]->theme_id_hei !== null) { |
|---|
| | 105 | return array ('theme' => $results[0]->theme_id_hei, 'providedBy' => $results[0]->public_id_hei); |
|---|
| | 106 | } else { |
|---|
| | 107 | $id = $this->getId ($results[0]->parent_heading_public_id_hei); |
|---|
| | 108 | } |
|---|
| | 109 | } while ($results[0]->parent_heading_public_id_hei == null); |
|---|
| | 121 | do { |
|---|
| | 122 | $parameters = _daoSp ()->addCondition ('id_helt', '=', $pIdHelt) |
|---|
| | 123 | ->addCondition ('type_hei', '=', $pTypeHei); |
|---|
| | 124 | |
|---|
| | 125 | $results = _dao('headingelementinformation')->findBy ($parameters); |
|---|
| | 126 | if ($results[0]->theme_id_hei !== null) { |
|---|
| | 127 | return array ('theme' => $results[0]->theme_id_hei, 'providedBy' => $results[0]->public_id_hei); |
|---|
| | 128 | } else { |
|---|
| | 129 | $id = $this->getId ($results[0]->parent_heading_public_id_hei); |
|---|
| | 130 | } |
|---|
| | 131 | } while ($results[0]->parent_heading_public_id_hei == null); |
|---|
| | 141 | $id = $this->getId($pPublicId); |
|---|
| | 142 | do { |
|---|
| | 143 | $parameters = _daoSp ()->addCondition ('id_helt', '=', $id['id_helt']) |
|---|
| | 144 | ->addCondition ('type_hei', '=', $id['type_hei']); |
|---|
| | 145 | |
|---|
| | 146 | $results = _dao('headingelementinformation')->findBy ($parameters); |
|---|
| | 147 | if ($results[0]->base_url_hei !== null) { |
|---|
| | 148 | return array ('theme' => $results[0]->base_url_hei, 'providedBy' => $results[0]->public_id_hei); |
|---|
| | 149 | } else { |
|---|
| | 150 | $id = $this->getId ($results[0]->parent_heading_public_id_hei); |
|---|
| | 151 | } |
|---|
| | 152 | } while ($results[0]->parent_heading_public_id_hei == null); |
|---|
| | 163 | do { |
|---|
| | 164 | $parameters = _daoSp ()->addCondition ('id_helt', '=', $pIdHelt) |
|---|
| | 165 | ->addCondition ('type_hei', '=', $pTypeHei); |
|---|
| | 166 | |
|---|
| | 167 | $results = _dao('headingelementinformation')->findBy ($parameters); |
|---|
| | 168 | if ($results[0]->base_url_hei !== null) { |
|---|
| | 169 | return array ('theme' => $results[0]->base_url_hei, 'providedBy' => $results[0]->public_id_hei); |
|---|
| | 170 | } else { |
|---|
| | 171 | $id = $this->getId ($results[0]->parent_heading_public_id_hei); |
|---|
| | 172 | } |
|---|
| | 173 | } while ($results[0]->parent_heading_public_id_hei == null); |
|---|
| | 183 | $id = $this->getId($pPublicId); |
|---|
| | 184 | do { |
|---|
| | 185 | $parameters = _daoSp ()->addCondition ('id_helt', '=', $id['id_helt']) |
|---|
| | 186 | ->addCondition ('type_hei', '=', $id['type_hei']); |
|---|
| | 187 | |
|---|
| | 188 | $results = _dao('headingelementinformation')->findBy ($parameters); |
|---|
| | 189 | if ($results[0]->public_id_root_menu_hei !== null) { |
|---|
| | 190 | return array ('theme' => $results[0]->public_id_root_menu_hei, 'providedBy' => $results[0]->public_id_hei); |
|---|
| | 191 | } else { |
|---|
| | 192 | $id = $this->getId ($results[0]->parent_heading_public_id_hei); |
|---|
| | 193 | } |
|---|
| | 194 | } while ($results[0]->parent_heading_public_id_hei == null); |
|---|
| | 205 | do { |
|---|
| | 206 | $parameters = _daoSp ()->addCondition ('id_helt', '=', $pIdHelt) |
|---|
| | 207 | ->addCondition ('type_hei', '=', $pTypeHei); |
|---|
| | 208 | |
|---|
| | 209 | $results = _dao('headingelementinformation')->findBy ($parameters); |
|---|
| | 210 | if ($results[0]->public_id_root_menu_hei !== null) { |
|---|
| | 211 | return array ('theme' => $results[0]->public_id_root_menu_hei, 'providedBy' => $results[0]->public_id_hei); |
|---|
| | 212 | } else { |
|---|
| | 213 | $id = $this->getId ($results[0]->parent_heading_public_id_hei); |
|---|
| | 214 | } |
|---|
| | 215 | } while ($results[0]->parent_heading_public_id_hei == null); |
|---|
| 150 | | public function getContextualMenu ($pPublicId){ |
|---|
| | 224 | public function getContextualMenu ($pPublicId) { |
|---|
| | 225 | $id = $this->getId($pPublicId); |
|---|
| | 226 | do { |
|---|
| | 227 | $parameters = _daoSp ()->addCondition ('id_helt', '=', $id['id_helt']) |
|---|
| | 228 | ->addCondition ('type_hei', '=', $id['type_hei']); |
|---|
| | 229 | |
|---|
| | 230 | $results = _dao('headingelementinformation')->findBy ($parameters); |
|---|
| | 231 | if ($results[0]->public_id_contextual_menu_hei !== null) { |
|---|
| | 232 | return array ('theme' => $results[0]->public_id_contextual_menu_hei, 'providedBy' => $results[0]->public_id_hei); |
|---|
| | 233 | } else { |
|---|
| | 234 | $id = $this->getId ($results[0]->parent_heading_public_id_hei); |
|---|
| | 235 | } |
|---|
| | 236 | } while ($results[0]->parent_heading_public_id_hei == null); |
|---|
| 159 | | */ |
|---|
| 160 | | public function getContextualMenuById ($pIdHelt, $pTypeHelt){ |
|---|
| | 245 | * @todo vérifier le retour |
|---|
| | 246 | */ |
|---|
| | 247 | public function getContextualMenuById ($pIdHelt, $pTypeHelt) { |
|---|
| | 248 | $publicId = $this->getPublicId ($pIdHelt, $pTypeHelt); |
|---|
| | 249 | $parameters = _daoSp ()->addCondition ('public_id_hei', '=', $pPublicId); |
|---|
| | 250 | $results = _dao('headingelementinformation')->findBy ($parameters); |
|---|
| | 251 | return array ('contextualMenu' => $results->public_id_contextual_menu_hei, 'providedBy' => $results->public_id_contextual_menu_hei); |
|---|
| 294 | | public function getMaxVersion ($pPublicId){ |
|---|
| 295 | | list ($idHelt, $typeHei) = $this->getId ($pPublicId); |
|---|
| 296 | | return _dao ('headingelementinformation')->getMaxVersion ($idHelt, $typeHei); |
|---|
| 297 | | |
|---|
| 298 | | |
|---|
| 299 | | $parameters = _daoSp ()->addCondition ('id_helt', '=', $idHelt) |
|---|
| 300 | | ->orderby (array('version_hei', 'DESC')) |
|---|
| 301 | | ->setLimit (0, 1); |
|---|
| 302 | | if (!$results = _dao('headingelementinformation')->findBy ($parameters)) { |
|---|
| | 399 | public function getMaxVersion ($pPublicId) { |
|---|
| | 400 | $parameters = _daoSp ()->addCondition ('public_id_hei', '=', $pPublicId); |
|---|
| | 401 | if (_dao('headingelementinformation')->findBy ($parameters) === false) { |
|---|