当前位置: 首页>>代码示例>>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;未经允许,请勿转载。