當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。