public function __viewExtensions() { $this->appendSubheading(__('Settings')); $this->appendTabs(); $path = ADMIN_URL . '/symphony/system/settings/'; // No settings for extensions here if (Extension::delegateSubscriptionCount('AddSettingsFieldsets', '/system/settings/extensions/') <= 0) { redirect($path); } // Status message: $callback = Administration::instance()->getPageCallback(); if (isset($callback['flag']) && !is_null($callback['flag'])) { switch ($callback['flag']) { case 'saved': $this->alerts()->append(__('System settings saved at %1$s.', array(DateTimeObj::getTimeAgo(__SYM_TIME_FORMAT__))), AlertStack::SUCCESS); break; } } $extension_fieldsets = array(); ### # Delegate: AddSettingsFieldsets # Description: Add Extension settings fieldsets. Append fieldsets to the array provided. They will be distributed evenly accross the 3 columns Extension::notify('AddSettingsFieldsets', '/system/settings/extensions/', array('fieldsets' => &$extension_fieldsets)); if (empty($extension_fieldsets)) { redirect($path); } $layout = new Layout(); $left = $layout->createColumn(Layout::LARGE); $center = $layout->createColumn(Layout::LARGE); $right = $layout->createColumn(Layout::LARGE); foreach ($extension_fieldsets as $index => $fieldset) { $index += 1; if ($index % 3 == 0) { $right->appendChild($fieldset); } elseif ($index % 2 == 0) { $center->appendChild($fieldset); } else { $left->appendChild($fieldset); } } $layout->appendTo($this->Form); $div = $this->createElement('div'); $div->setAttribute('class', 'actions'); $div->appendChild(Widget::Submit('action[save]', __('Save Changes'), array('accesskey' => 's'))); $this->Form->appendChild($div); }