本文整理汇总了PHP中DataObject::getBetterButtonsActions方法的典型用法代码示例。如果您正苦于以下问题:PHP DataObject::getBetterButtonsActions方法的具体用法?PHP DataObject::getBetterButtonsActions怎么用?PHP DataObject::getBetterButtonsActions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataObject
的用法示例。
在下文中一共展示了DataObject::getBetterButtonsActions方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getBetterButtonsActions
/**
* @return FieldList
*/
public function getBetterButtonsActions()
{
$fields = parent::getBetterButtonsActions();
$fields->push(BetterButtonCustomAction::create('sendPreview', 'Send Preview to Me')->setRedirectType(BetterButtonCustomAction::REFRESH)->setSuccessMessage('Sent to ' . Member::currentUser()->Email));
if (!$this->SentAt) {
$fields->push(BetterButtonCustomAction::create('send', 'Send to List')->setRedirectType(BetterButtonCustomAction::REFRESH)->setSuccessMessage('Sent to mailing list.'));
} else {
$fields->push(BetterButtonCustomAction::create('duplicateEmail', 'Duplicate')->setRedirectType(BetterButtonCustomAction::GOBACK)->setSuccessMessage('Mailing was duplicated.'));
}
return $fields;
}
示例2: getBetterButtonsActions
public function getBetterButtonsActions()
{
$fields = parent::getBetterButtonsActions();
if (!$this->getRecord()) {
return $fields;
}
if ($this->getRecord()->ContentNotifierApproved) {
$fields->push(BetterButtonCustomAction::create('deny', 'Deny')->setRedirectType(BetterButtonCustomAction::REFRESH)->setSuccessMessage('Denied for publication'));
} else {
$fields->push(BetterButtonCustomAction::create('approve', 'Approve')->setRedirectType(BetterButtonCustomAction::REFRESH)->setSuccessMessage('Approved for publication'));
}
$fields->push(new BetterButtonLink('Edit this ' . $this->RecordClass, $this->getRecord()->getContentNotifierLink()));
return $fields;
}
示例3: getBetterButtonsActions
public function getBetterButtonsActions()
{
$fields = parent::getBetterButtonsActions();
if ($this->IsApproved) {
$fields->push(BetterButtonCustomAction::create('deny', 'Deny')->setRedirectType(BetterButtonCustomAction::REFRESH));
} else {
$fields->push(BetterButtonCustomAction::create('approve', 'Approve')->setRedirectType(BetterButtonCustomAction::REFRESH));
}
if ($this->IsApproved && $this->IsApproved) {
$fields->push(new BetterButtonLink_TargetWindow('View Post on site', $this->getPublishedBlogLink()));
$fields->push(new BetterButtonLink('View In CMS', $this->getCMSEditLink()));
}
return $fields;
}
示例4: getBetterButtonsActions
public function getBetterButtonsActions()
{
$f = parent::getBetterButtonsActions();
if (Director::isDev() && Permission::check('ADMIN')) {
$f->push(new DropdownFormAction('Dev tools', [new BetterButtonNestedForm('forcephase', 'Force phase...', FieldList::create(DropdownField::create('Phase', 'Choose a phase', [0 => 'ACCEPTING SUBMISSIONS', 1 => 'COMMUNITY VOTING', 2 => 'TRACK CHAIR SELECTION', 3 => 'REGISTRATION', 4 => 'SUMMIT IS ON']))), BetterButtonCustomAction::create('resetvotes', 'Reset presentation votes')->setRedirectType(BetterButtonCustomAction::REFRESH)->setSuccessMessage('All votes have been reset'), BetterButtonCustomAction::create('setasactive', 'Set as active')->setRedirectType(BetterButtonCustomAction::REFRESH)->setSuccessMessage('Summit is now active')]));
}
return $f;
}
示例5: getBetterButtonsActions
public function getBetterButtonsActions()
{
$f = parent::getBetterButtonsActions();
$f->push(BetterButtonCustomAction::create('testemail', 'Send a test')->setRedirectType(BetterButtonCustomAction::REFRESH)->setSuccessMessage('Test email sent to ' . $this->TestEmailAddress));
return $f;
}
示例6: getBetterButtonsActions
/**
* Gets a list of actions for the ModelAdmin interface
* @return FieldList
*/
public function getBetterButtonsActions()
{
$fields = parent::getBetterButtonsActions();
$fields->push(BetterButtonCustomAction::create('resend', 'Resend')->setRedirectType(BetterButtonCustomAction::REFRESH));
return $fields;
}
示例7: getBetterButtonsActions
public function getBetterButtonsActions()
{
$f = parent::getBetterButtonsActions();
$f->push(BetterButtonCustomAction::create('testemail', 'Send a test')->setRedirectType(BetterButtonCustomAction::REFRESH));
return $f;
}