當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Tab::insertAfter方法代碼示例

本文整理匯總了PHP中Tab::insertAfter方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tab::insertAfter方法的具體用法?PHP Tab::insertAfter怎麽用?PHP Tab::insertAfter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Tab的用法示例。


在下文中一共展示了Tab::insertAfter方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: insertAfter

 /**
  * @inheritdoc
  */
 public function insertAfter($field, $insertBefore)
 {
     return $this->tab->insertAfter($field, $insertBefore);
 }
開發者ID:helpfulrobot,項目名稱:firebrandhq-silverstripe-excel-export,代碼行數:7,代碼來源:SplitButton.php

示例2: updateCMSFields

 /**
  * standard SS method
  */
 function updateCMSFields(FieldList $fields)
 {
     $tabName = singleton("ProductVariation")->plural_name();
     $fields->addFieldToTab('Root', $tab = new Tab($tabName, new GridField("VariationAttributes", singleton("ProductAttributeType")->plural_name(), $this->owner->VariationAttributes(), $variationAttributesConfig = GridFieldConfig_RecordEditor::create()), $this->owner->getVariationsTable(), new CreateEcommerceVariations_Field('VariationMaker', '', $this->owner->ID)));
     $variationAttributesConfig->removeComponentsByType("GridFieldAddNewButton");
     $variations = $this->owner->Variations();
     if ($variations && $variations->Count()) {
         $productVariationName = singleton("ProductVariation")->plural_name();
         $fields->addFieldToTab('Root.Details', new LabelField('variationspriceinstructions', sprintf(_t("ProductVariation.PRICE_EXPLANATION", 'Price - Because you have one or more variations, you can vary the price in the <strong>%s</strong> tab. You set the default price here.'), $productVariationName)));
         $link = EcommerceProductVariationTaskDeleteVariations::create_link($this->owner);
         if ($link) {
             $tab->insertAfter(new LiteralField("DeleteVariations", "<p class=\"bad message\"><a href=\"{$link}\"  class=\"action ss-ui-button\" id=\"DeleteEcommerceVariationsInner\" data-confirm=\"" . Convert::raw2att(_t("Product.ARE_YOU_SURE_YOU_WANT_TO_DELETE_ALL_VARIATIONS", "are you sure you want to delete all variations from this product? ")) . "\">" . _t("Product.DELETE_ALL_VARIATIONS_FROM", "Delete all variations from <i>") . $this->owner->Title . "</i>" . "</a></p>"), 'ProductVariations');
         }
         if (class_exists('DataObjectOneFieldUpdateController')) {
             $linkForAllowSale = DataObjectOneFieldUpdateController::popup_link('ProductVariation', 'AllowPurchase', "ProductID = {$this->owner->ID}", '', _t("ProductVariation.QUICK_UPDATE_VARIATION_ALLOW_PURCHASE", 'for sale'));
             $linkForPrice = DataObjectOneFieldUpdateController::popup_link('ProductVariation', 'Price', "ProductID = {$this->owner->ID}", '', _t("ProductVariation.QUICK_UPDATE_VARIATION_PRICES", 'prices'));
             $linkForProductCodes = DataObjectOneFieldUpdateController::popup_link('ProductVariation', 'InternalItemID', "ProductID = {$this->owner->ID}", '', _t("ProductVariation.QUICK_UPDATE_VARIATION_PRODUCT_CODES", 'product codes'));
             $tab->insertAfter(new LiteralField('QuickActions', '<p class="message good">' . _t("ProductVariation.QUICK_UPDATE", 'Quick update') . ': ' . "<span class=\"action ss-ui-button\">{$linkForAllowSale}</span> " . "<span class=\"action ss-ui-button\">{$linkForPrice}</span>" . "<span class=\"action ss-ui-button\">{$linkForProductCodes}</span>" . "</p>"), 'ProductVariations');
         }
     }
 }
開發者ID:TouchtechLtd,項目名稱:silverstripe-ecommerce_product_variation,代碼行數:24,代碼來源:ProductWithVariationDecorator.php


注:本文中的Tab::insertAfter方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。