Version: current

     1 <?php
     2 /*
     3  * Äĺęîđŕňîđ äë˙ äîáŕâëĺíč˙ ďîäőîä˙ůčő ńďîńîáîâ îďëŕňű äë˙ äŕííîé äîńňŕâęč
     4  * (ďîäęëţ÷ŕĺňń˙ ĺńëč óńňŕíîâëĺí ěîäóëü îďëŕňű)
     5  *
     6  */
     7 class ShippingMethodPaymentDecorator extends DataObjectDecorator {
     8     function extraStatics() {
     9         return array(
    10             'many_many' => array(
    11                 "PossiblePaymentMethods" => "PaymentMethod"
    12             )
    13         );
    14     }
    15
    16     function updateCMSFields(& $fields) {
    17         $tf = new ManyManyComplexTableField($this->owner, 'PossiblePaymentMethods', 'PaymentMethod');
    18         $tf->setPermissions(array('show'));
    19         $fields->replaceField('PossiblePaymentMethods', $tf);
    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. -