| 1 | <?php |
||
| 8 | class ShippableProduct extends FoxyStripeProduct implements PermissionProvider |
||
| 9 | { |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | private static $singular_name = 'Shippable Product'; |
||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | private static $plural_name = 'Shippable Products'; |
||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | private static $description = 'A physical product that is shipped to a buyer'; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var array |
||
| 26 | */ |
||
| 27 | private static $db = [ |
||
| 28 | 'Weight' => 'Decimal', |
||
| 29 | ]; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return FieldList |
||
| 33 | */ |
||
| 34 | public function getCMSFields() |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return ValidationResult |
||
| 44 | */ |
||
| 45 | 8 | public function validate() |
|
| 55 | |||
| 56 | /** |
||
| 57 | * @param Member $member |
||
| 58 | * @return boolean |
||
| 59 | */ |
||
| 60 | public function canEdit($member = null) |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @param null $member |
||
| 67 | * @return bool|int |
||
| 68 | */ |
||
| 69 | public function canDelete($member = null) |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @param null $member |
||
| 76 | * @return bool|int |
||
| 77 | */ |
||
| 78 | public function canCreate($member = null) |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @param null $member |
||
| 85 | * @return bool|int |
||
| 86 | */ |
||
| 87 | public function canPublish($member = null) |
||
| 91 | |||
| 92 | /** |
||
| 93 | * @return array |
||
| 94 | */ |
||
| 95 | public function providePermissions() |
||
| 101 | |||
| 102 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.