1 <?php
2
3 class PaymentMethodShippingDecorator extends DataObjectDecorator {
4 function () {
5 return array(
6 'belongs_many_many' => array(
7 'ShippingMethod' => 'ShippingMethod'
8 )
9 );
10 }
11
12 function updateCMSFields(& $fields) {
13 $fields->removeByName('ShippingMethod');
14
15 $tab = $fields->findOrMakeTab('Root.ShippindMethods',_t('PaymentMethod.many_many_ShippingMethod','Shipping Methods'));
16 $tf = new ManyManyComplexTableField($this->owner, 'ShippingMethod', 'ShippingMethod');
17 $tf->setPermissions(array('show'));
18 $tab->push($tf);
19
20 }
21 }
[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the
Silverstripe Forums to ask development related questions.
-