当前位置: 首页>>代码示例>>PHP>>正文


PHP DataObject::getBetterButtonsActions方法代码示例

本文整理汇总了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;
 }
开发者ID:markguinn,项目名称:silverstripe-shop-email,代码行数:14,代码来源:MailingListEmail.php

示例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;
 }
开发者ID:phillprice,项目名称:silverstripe-content-notifier,代码行数:14,代码来源:ContentNotifierQueue.php

示例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;
 }
开发者ID:chitosystems,项目名称:blog-guestbook,代码行数:14,代码来源:BlogGuestBookSubmission.php

示例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;
 }
开发者ID:Thingee,项目名称:openstack-org,代码行数:8,代码来源:Summit.php

示例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;
 }
开发者ID:xmarkclx,项目名称:silverstripe-permamail,代码行数:6,代码来源:PermamailTemplate.php

示例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;
 }
开发者ID:unclecheese,项目名称:silverstripe-permamail,代码行数:10,代码来源:SentEmail.php

示例7: getBetterButtonsActions

 public function getBetterButtonsActions()
 {
     $f = parent::getBetterButtonsActions();
     $f->push(BetterButtonCustomAction::create('testemail', 'Send a test')->setRedirectType(BetterButtonCustomAction::REFRESH));
     return $f;
 }
开发者ID:unclecheese,项目名称:silverstripe-permamail,代码行数:6,代码来源:PermamailTemplate.php


注:本文中的DataObject::getBetterButtonsActions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。