本文整理汇总了PHP中manager::Trigger方法的典型用法代码示例。如果您正苦于以下问题:PHP manager::Trigger方法的具体用法?PHP manager::Trigger怎么用?PHP manager::Trigger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类manager
的用法示例。
在下文中一共展示了manager::Trigger方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Trigger
function Trigger()
{
global $Core;
switch ($this->button) {
case 'add':
case 'edit':
case 'addcontacts':
case 'editcontacts':
$this->AddButton('Save');
$this->InitSkin();
$this->InitEditor();
$this->Edit();
break;
case 'save':
if (DEMO_MODE) {
$Core->ExitDemoEvent($this->redirect);
}
$this->SaveItems();
break;
case 'delete':
case 'deletecontacts':
if (DEMO_MODE) {
$Core->ExitDemoEvent($this->redirect);
}
$this->DeleteItem();
break;
case 'cancel':
$Core->ExitEvent(2, $this->redirect);
break;
case '':
$this->AddButton('Add');
$this->InitProps();
$this->ViewItems();
break;
default:
parent::Trigger();
break;
}
}
示例2: Trigger
function Trigger()
{
global $Core;
switch ($this->button) {
case 'add':
case 'edit':
case 'editblock':
$this->AddButton('Save');
$this->InitSkin();
$this->InitEditor();
$this->Edit();
break;
case 'clearcache':
$this->clearCache();
break;
case 'save':
if (DEMO_MODE) {
$Core->ExitDemoEvent($this->redirect);
}
$this->PrepareForSave();
$this->SaveItems();
$Core->UpdateSitemap();
break;
case 'delete':
case 'deleteblock':
if (DEMO_MODE) {
$Core->ExitDemoEvent($this->redirect);
}
$this->DeleteItem();
break;
case 'publish':
case 'unpublish':
case 'publishblock':
case 'unpublishblock':
if (DEMO_MODE) {
$Core->ExitDemoEvent($this->redirect);
}
$this->publishPage();
break;
case 'cancel':
$Core->ExitEvent(2, $this->redirect);
break;
case '':
$this->filterObjs();
$this->AddButton('Add');
$this->AddButton('Clear Cache');
$this->InitProps();
$this->PublishedValueToString();
$this->MenuIdToString();
$this->ViewItems();
break;
default:
parent::Trigger();
break;
}
}