| 1 | <?php |
||
| 3 | class PhotoGalleryBlockImage extends DataObject |
||
| 4 | { |
||
| 5 | /** |
||
| 6 | * @var string |
||
| 7 | */ |
||
| 8 | private static $singular_name = 'Gallery Image'; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @var string |
||
| 12 | */ |
||
| 13 | private static $plural_name = 'Gallery Images'; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var array |
||
| 17 | */ |
||
| 18 | private static $db = array( |
||
| 19 | 'Title' => 'Varchar(255)', |
||
| 20 | 'Content' => 'HTMLText', |
||
| 21 | 'SortOrder' => 'Int', |
||
| 22 | ); |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var array |
||
| 26 | */ |
||
| 27 | private static $has_one = array( |
||
| 28 | 'PhotoGallery' => 'PhotoGalleryBlock', |
||
| 29 | 'Image' => 'Image', |
||
| 30 | ); |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var array |
||
| 34 | */ |
||
| 35 | private static $summary_fields = array( |
||
| 36 | 'Image.CMSThumbnail' => 'Image', |
||
| 37 | 'Title' => 'Title', |
||
| 38 | ); |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @var array |
||
| 42 | */ |
||
| 43 | private static $searchable_fields = array( |
||
| 44 | 'Title', |
||
| 45 | 'Content', |
||
| 46 | ); |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @var array |
||
| 50 | */ |
||
| 51 | private static $extensions = [ |
||
| 52 | 'VersionedDataObject' |
||
| 53 | ]; |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @return FieldList |
||
| 57 | */ |
||
| 58 | 1 | public function getCMSFields() |
|
| 72 | |||
| 73 | /** |
||
| 74 | * @param null $member |
||
| 75 | * |
||
| 76 | * @return bool |
||
| 77 | */ |
||
| 78 | 1 | public function canCreate($member = null) |
|
| 82 | |||
| 83 | /** |
||
| 84 | * @param null $member |
||
| 85 | * |
||
| 86 | * @return bool |
||
| 87 | */ |
||
| 88 | 1 | public function canView($member = null) |
|
| 92 | |||
| 93 | /** |
||
| 94 | * @param null $member |
||
| 95 | * |
||
| 96 | * @return bool |
||
| 97 | */ |
||
| 98 | 1 | public function canEdit($member = null) |
|
| 102 | |||
| 103 | /** |
||
| 104 | * @param null $member |
||
| 105 | * |
||
| 106 | * @return bool |
||
| 107 | */ |
||
| 108 | 1 | public function canDelete($member = null) |
|
| 112 | } |
||
| 113 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: