| @@ 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 | { |
|
| @@ 332-344 (lines=13) @@ | ||
| 329 | return (string)$query; |
|
| 330 | } |
|
| 331 | ||
| 332 | public function build(array $context = array()) |
|
| 333 | { |
|
| 334 | $section_id = SectionManager::fetchIDFromHandle($context['section_handle']); |
|
| 335 | ||
| 336 | if ($section_id) { |
|
| 337 | $context['associations'] = array( |
|
| 338 | 'parent' => SectionManager::fetchParentAssociations($section_id), |
|
| 339 | 'child' => SectionManager::fetchChildAssociations($section_id) |
|
| 340 | ); |
|
| 341 | } |
|
| 342 | ||
| 343 | return parent::build($context); |
|
| 344 | } |
|
| 345 | ||
| 346 | public function action() |
|
| 347 | { |
|