Version: current

     1 <?php
     2 // Äŕííűĺ ÷ĺëîâĺęŕ äë˙ çŕęŕçŕ
     3 class RoomOrderPerson extends DataObject {
     4     static $db = array(
     5         'FirstName' => 'Varchar(100)',
     6         'LastName' => 'Varchar(100)',
     7         'SureName' => 'Varchar(100)',
     8         'Citizenship' => 'Varchar(100)',
     9     );
    10
    11     static $has_one = array(
    12         'RoomOrder' => 'RoomOrder', // çŕęŕç íîěĺđŕ
    13     );
    14
    15     static $summary_fields = array('FirstName', 'LastName', 'SureName', 'Citizenship');
    16
    17     function getTitle() {
    18         return trim($this->FirstName . ' ' . $this->LastName . ' ' . $this->SureName);
    19     }
    20
    21     function canView($member = null) {
    22         return Permission::check('CMS_ACCESS_BookingOrderAdmin', 'any', $member);
    23     }
    24
    25     function canEdit($member = null) {
    26         return Permission::check('CMS_ACCESS_BookingOrderAdmin', 'any', $member);
    27     }
    28
    29     function canDelete($member = null) {
    30         return Permission::check('CMS_ACCESS_BookingOrderAdmin', 'any', $member);
    31     }
    32
    33     function canCreate($member = null) {
    34         return Permission::check('CMS_ACCESS_BookingOrderAdmin', 'any', $member);
    35     }
    36 }

[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. -