| @@ 15-26 (lines=12) @@ | ||
| 12 | { |
|
| 13 | public $_errors = array(); |
|
| 14 | ||
| 15 | public function build(array $context = array()) |
|
| 16 | { |
|
| 17 | if (isset($context[1])) { |
|
| 18 | $section_id = $context[1]; |
|
| 19 | $context['associations'] = array( |
|
| 20 | 'parent' => SectionManager::fetchParentAssociations($section_id), |
|
| 21 | 'child' => SectionManager::fetchChildAssociations($section_id) |
|
| 22 | ); |
|
| 23 | } |
|
| 24 | ||
| 25 | return parent::build($context); |
|
| 26 | } |
|
| 27 | ||
| 28 | public function __viewIndex() |
|
| 29 | { |
|
| @@ 316-328 (lines=13) @@ | ||
| 313 | return (string)$query; |
|
| 314 | } |
|
| 315 | ||
| 316 | public function build(array $context = array()) |
|
| 317 | { |
|
| 318 | $section_id = SectionManager::fetchIDFromHandle($context['section_handle']); |
|
| 319 | ||
| 320 | if ($section_id) { |
|
| 321 | $context['associations'] = array( |
|
| 322 | 'parent' => SectionManager::fetchParentAssociations($section_id), |
|
| 323 | 'child' => SectionManager::fetchChildAssociations($section_id) |
|
| 324 | ); |
|
| 325 | } |
|
| 326 | ||
| 327 | return parent::build($context); |
|
| 328 | } |
|
| 329 | ||
| 330 | public function action() |
|
| 331 | { |
|