1 <?php
2
3 class BookingPaymentMethod extends DataObject {
4 static $db = array(
5 'Title' => 'Varchar(100)',
6 'Active' => 'Boolean',
7 'Description' => 'Text',
8 );
9
10 static $has_one = array(
11 'BookingPage' => 'BookingPage'
12
13 );
14
15 static function getPaymentMethods($active=1) {
16 $where = '';
17 if ($active) {
18 $where = 'Active = 1';
19 }
20 return DataObject::get('BookingPaymentMethod', $where);
21 }
22 }
[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.
-