-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from muskie9/statics
Update statics from public to private
- Loading branch information
Showing
5 changed files
with
374 additions
and
346 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,37 @@ | ||
<?php | ||
class LocationAdmin extends ModelAdmin { | ||
|
||
static $managed_models = array( | ||
'Location', | ||
'LocationCategory' | ||
); | ||
|
||
static $model_importers = array( | ||
'Location' => 'LocationCsvBulkLoader', | ||
'LocationCategory' => 'CsvBulkLoader' | ||
|
||
class LocationAdmin extends ModelAdmin | ||
{ | ||
|
||
private static $managed_models = array( | ||
'Location', | ||
'LocationCategory' | ||
); | ||
|
||
static $menu_title = 'Locator'; | ||
static $url_segment = 'locator'; | ||
|
||
public function getExportFields() { | ||
private static $model_importers = array( | ||
'Location' => 'LocationCsvBulkLoader', | ||
'LocationCategory' => 'CsvBulkLoader' | ||
); | ||
|
||
private static $menu_title = 'Locator'; | ||
private static $url_segment = 'locator'; | ||
|
||
public function getExportFields() | ||
{ | ||
return array( | ||
'Title' => 'Name', | ||
'Address' => 'Address', | ||
'Suburb' => 'City', | ||
'State' => 'State', | ||
'Postcode' => 'Postal Code', | ||
'Country' => 'Country', | ||
'Website' => 'Website', | ||
'Phone' => 'Phone', | ||
'Fax' => 'Fax', | ||
'EmailAddress' => 'Email Address', | ||
'ShowInLocator' => 'Show', | ||
'Lat' => 'Lat', | ||
'Lng' => 'Lng' | ||
'Postcode' => 'Postal Code', | ||
'Country' => 'Country', | ||
'Website' => 'Website', | ||
'Phone' => 'Phone', | ||
'Fax' => 'Fax', | ||
'EmailAddress' => 'Email Address', | ||
'ShowInLocator' => 'Show', | ||
'Lat' => 'Lat', | ||
'Lng' => 'Lng' | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
<?php | ||
|
||
class LocationCategory extends DataObject { | ||
|
||
static $db = array( | ||
'Name' => 'Varchar(100)' | ||
); | ||
|
||
static $has_many = array( | ||
'Locations' => 'Location' | ||
); | ||
|
||
public static $singular_name = "Category"; | ||
public static $plural_name = "Categories"; | ||
|
||
private static $default_sort = 'Name'; | ||
|
||
class LocationCategory extends DataObject | ||
{ | ||
|
||
private static $db = array( | ||
'Name' => 'Varchar(100)' | ||
); | ||
|
||
private static $has_many = array( | ||
'Locations' => 'Location' | ||
); | ||
|
||
private static $singular_name = "Category"; | ||
Private static $plural_name = "Categories"; | ||
|
||
private static $default_sort = 'Name'; | ||
|
||
} |
Oops, something went wrong.