本文整理汇总了PHP中Extension::delegateSubscriptionCount方法的典型用法代码示例。如果您正苦于以下问题:PHP Extension::delegateSubscriptionCount方法的具体用法?PHP Extension::delegateSubscriptionCount怎么用?PHP Extension::delegateSubscriptionCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Extension
的用法示例。
在下文中一共展示了Extension::delegateSubscriptionCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __viewExtensions
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);
}