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


PHP DataObject::getCMSActions方法代码示例

本文整理汇总了PHP中DataObject::getCMSActions方法的典型用法代码示例。如果您正苦于以下问题:PHP DataObject::getCMSActions方法的具体用法?PHP DataObject::getCMSActions怎么用?PHP DataObject::getCMSActions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataObject的用法示例。


在下文中一共展示了DataObject::getCMSActions方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getCMSActions

 /**
  * Adds a button the Site Config page of the CMS to rebuild the Lucene search index.
  */
 public function getCMSActions()
 {
     $actions = parent::getCMSActions();
     if ($fileLocation = $this->getFullLocationWithExtension() || 1 == 1) {
         clearstatcache();
         if (file_exists($this->FullLocation)) {
             //do nothing
         } else {
             $lastChanged = _t('Databasebackup.NO_BACKUP_IS_AVAILABLE', 'This Backup is Available ... ');
         }
         if (Permission::check("ADMIN")) {
             if (!$this->exists()) {
                 $actions->push(new FormAction('doMakeDatabaseBackup', _t('Databasebackup.MAKE_DATABASE_BACKUP', 'Make Database Backup') . "; " . $lastChanged));
             } else {
                 if (file_exists($this->FullLocation)) {
                     if (!Director::IsLive() || $this->Config()->get("allow_restores_in_live_environment")) {
                         $actions->push(new FormAction('doRestoreDatabaseBackup', _t('Databasebackup.RESTORE_DB_BACKUP_NOW', 'Restore This Database (override current one)')));
                     }
                 }
             }
         }
     }
     $this->extend('updateCMSActions', $actions);
     return $actions;
 }
开发者ID:helpfulrobot,项目名称:sunnysideup-databasebackup,代码行数:28,代码来源:DatabasebackupLog.php

示例2: getCMSActions

 public function getCMSActions()
 {
     $actions = parent::getCMSActions();
     $actions->push(FormAction::create('doGenerateCampaign', _t('Chimpify.ButtonLabelGenerateCampaign', 'Create in MailChimp')));
     $this->extend('updateCMSActions', $actions);
     return $actions;
 }
开发者ID:somardesignstudios,项目名称:silverstripe-chimpify,代码行数:7,代码来源:ChimpifyCampaign.php

示例3: getCMSActions

 /**
  * @return FieldList
  */
 public function getCMSActions()
 {
     $actions = parent::getCMSActions();
     if (!$this->ID || $this->AccessToken) {
         $this->extend('updateCMSActions', $actions);
         return $actions;
     }
     $client = self::getNewInstagramClient();
     $loginURL = $client->getLoginUrl();
     $this->setSessionOAuthState($this->getOAuthStateValueFromLoginURL($loginURL));
     $actions->push(LiteralField::create('OAuthLink', '<a class="ss-ui-button" href="' . $loginURL . '">' . _t('Instagram.ButtonLabelAuthoriseAccount', 'Authorise account') . '</a>'));
     $this->extend('updateCMSActions', $actions);
     return $actions;
 }
开发者ID:somardesignstudios,项目名称:silverstripe-instagram,代码行数:17,代码来源:InstagramAccount.php

示例4: getCMSActions

 public function getCMSActions()
 {
     $actions = parent::getCMSActions();
     $addCreditCard = new FormAction('addCreditCard', 'Add Credit Card');
     $addCreditCard->addExtraClass('ss-ui-action-constructive');
     $updateCreditCard = new FormAction('updateCreditCard', 'Update Credit Card');
     $updateCreditCard->addExtraClass('ss-ui-action-constructive');
     if ($this->ID) {
         $actions->push($updateCreditCard);
     }
     if (!$this->ID) {
         $actions->push($addCreditCard);
     }
     return $actions;
 }
开发者ID:hemant-chakka,项目名称:awss,代码行数:15,代码来源:CreditCard.php

示例5: getCMSActions

 public function getCMSActions()
 {
     $actions = parent::getCMSActions();
     $createSubscription = new FormAction('createSubscription', 'Create Subscription');
     $createSubscription->addExtraClass('ss-ui-action-constructive');
     $cancelSubscription = new FormAction('cancelSubscription', 'Cancel Subscription');
     $cancelSubscription->addExtraClass('ss-ui-action-destructive');
     $changeSubscription = new FormAction('changeSubscription', 'Change Subscription');
     $changeSubscription->addExtraClass('ss-ui-action-constructive');
     if ($this->ID && $this->Status && ($this->ProductID == 1 || $this->ProductID == 2 || $this->ProductID == 3)) {
         $actions->push($cancelSubscription);
         $actions->push($changeSubscription);
     }
     if (!$this->ID) {
         $actions->push($createSubscription);
     }
     return $actions;
 }
开发者ID:hemant-chakka,项目名称:awss,代码行数:18,代码来源:Subscription.php

示例6: getCMSActions

 public function getCMSActions()
 {
     $actions = parent::getCMSActions();
     $actions->push(new FormAction('save', 'Save'));
     return $actions;
 }
开发者ID:CrackerjackDigital,项目名称:silverstripe-profiled,代码行数:6,代码来源:ProfiledConfig.php

示例7: getCMSActions

 /**
  * Set custom CMS actions which call 
  * OrderAdmin_RecordController actions of the same name
  * 
  * @see DataObject::getCMSActions()
  * @return FieldList
  */
 public function getCMSActions()
 {
     $actions = parent::getCMSActions();
     return $actions;
 }
开发者ID:vinstah,项目名称:body,代码行数:12,代码来源:Order.php

示例8: getCMSActions

 public function getCMSActions()
 {
     $actions = parent::getCMSActions();
     $actions->push(new FormAction('compose', _t('ComposedPdf.COMPOSE', 'Compose')));
     return $actions;
 }
开发者ID:helpfulrobot,项目名称:silverstripe-australia-pdfrendition,代码行数:6,代码来源:ComposedPdf.php


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