| @@ 36-48 (lines=13) @@ | ||
| 33 | $context = array_filter($params); |
|
| 34 | } |
|
| 35 | ||
| 36 | public function build(array $context = array()) |
|
| 37 | { |
|
| 38 | $section_id = $context['id']; |
|
| 39 | ||
| 40 | if (isset($section_id)) { |
|
| 41 | $context['associations'] = array( |
|
| 42 | 'parent' => SectionManager::fetchParentAssociations($section_id), |
|
| 43 | 'child' => SectionManager::fetchChildAssociations($section_id) |
|
| 44 | ); |
|
| 45 | } |
|
| 46 | ||
| 47 | return parent::build($context); |
|
| 48 | } |
|
| 49 | ||
| 50 | public function __viewIndex() |
|
| 51 | { |
|
| @@ 96-108 (lines=13) @@ | ||
| 93 | } |
|
| 94 | } |
|
| 95 | ||
| 96 | public function build(array $context = array()) |
|
| 97 | { |
|
| 98 | $section_id = SectionManager::fetchIDFromHandle($context['section_handle']); |
|
| 99 | ||
| 100 | if ($section_id) { |
|
| 101 | $context['associations'] = array( |
|
| 102 | 'parent' => SectionManager::fetchParentAssociations($section_id), |
|
| 103 | 'child' => SectionManager::fetchChildAssociations($section_id) |
|
| 104 | ); |
|
| 105 | } |
|
| 106 | ||
| 107 | return parent::build($context); |
|
| 108 | } |
|
| 109 | ||
| 110 | public function action() |
|
| 111 | { |
|