| @@ 37-49 (lines=13) @@ | ||
| 34 | $context = array_filter($params); |
|
| 35 | } |
|
| 36 | ||
| 37 | public function build(array $context = array()) |
|
| 38 | { |
|
| 39 | $section_id = $context['id']; |
|
| 40 | ||
| 41 | if (isset($section_id)) { |
|
| 42 | $context['associations'] = array( |
|
| 43 | 'parent' => SectionManager::fetchParentAssociations($section_id), |
|
| 44 | 'child' => SectionManager::fetchChildAssociations($section_id) |
|
| 45 | ); |
|
| 46 | } |
|
| 47 | ||
| 48 | return parent::build($context); |
|
| 49 | } |
|
| 50 | ||
| 51 | public function __viewIndex() |
|
| 52 | { |
|
| @@ 347-359 (lines=13) @@ | ||
| 344 | return (string)$query; |
|
| 345 | } |
|
| 346 | ||
| 347 | public function build(array $context = array()) |
|
| 348 | { |
|
| 349 | $section_id = SectionManager::fetchIDFromHandle($context['section_handle']); |
|
| 350 | ||
| 351 | if ($section_id) { |
|
| 352 | $context['associations'] = array( |
|
| 353 | 'parent' => SectionManager::fetchParentAssociations($section_id), |
|
| 354 | 'child' => SectionManager::fetchChildAssociations($section_id) |
|
| 355 | ); |
|
| 356 | } |
|
| 357 | ||
| 358 | return parent::build($context); |
|
| 359 | } |
|
| 360 | ||
| 361 | public function action() |
|
| 362 | { |
|