1 | <?php |
||
8 | class GoogleMapSearchRecord extends DataObject |
||
9 | { |
||
10 | private static $db = array( |
||
|
|||
11 | "IPAddres" => "Varchar(32)", |
||
12 | "SearchedFor" => "Text" |
||
13 | ); |
||
14 | |||
15 | private static $searcheabl_fields = array( |
||
16 | "SearchedFor" => "PartialMatchFilter" |
||
17 | ); |
||
18 | private static $summary_fields = array( |
||
19 | "SearchedFor" => "Searched for ..." |
||
20 | ); |
||
21 | |||
22 | private static $has_one = array( |
||
23 | "Member" => "Member", |
||
24 | "Parent" => "SiteTree", |
||
25 | "GoogleMapLocationsObject" => "GoogleMapLocationsObject" |
||
26 | ); |
||
27 | |||
28 | public static function create_new($searchedFor, $parentID = 0, $addGoogleMapLocationsObjectOrItsID = false) |
||
48 | |||
49 | |||
50 | public function onBeforeWrite() |
||
59 | |||
60 | /** |
||
61 | * @return bool |
||
62 | */ |
||
63 | public function canDelete($member = null) |
||
67 | |||
68 | /** |
||
69 | * @return bool |
||
70 | */ |
||
71 | public function canEdit($member = null) |
||
75 | } |
||
76 |