Skip to content

Commit

Permalink
REFACTOR various class names and method call names
Browse files Browse the repository at this point in the history
  • Loading branch information
muskie9 committed Jul 25, 2016
1 parent 6478d3c commit 73badf2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions code/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function getCoords()
// custom labels for fields
public function fieldLabels($includerelations = true)
{
$labels = parent::fieldLabels();
$labels = parent::fieldLabels($includerelations);

$labels['Title'] = 'Name';
$labels['Suburb'] = 'City';
Expand Down Expand Up @@ -99,7 +99,7 @@ public function getCMSFields()
EmailField::create('Email', 'Email'),
TextField::create('Website')
->setAttribute('placeholder', 'http://'),
DropDownField::create('CategoryID', 'Category', LocationCategory::get()->map('ID', 'Title'))
DropdownField::create('CategoryID', 'Category', LocationCategory::get()->map('ID', 'Title'))
->setEmptyString('-- select --'),
CheckboxField::create('ShowInLocator', 'Show in results')
->setDescription('Location will be included in results list'),
Expand Down Expand Up @@ -142,22 +142,22 @@ public function EmailAddress()
*
* @return bool
*/
public function canView($member = false)
public function canView($member = null)
{
return true;
}

public function canEdit($member = false)
public function canEdit($member = null)
{
return Permission::check('Location_EDIT');
}

public function canDelete($member = false)
public function canDelete($member = null)
{
return Permission::check('Location_DELETE');
}

public function canCreate($member = false)
public function canCreate($member = null)
{
return Permission::check('Location_CREATE');
}
Expand Down
2 changes: 1 addition & 1 deletion code/Locator.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public function LocationSearch()

$locatorCategories = Locator::getPageCategories($this->ID);

if (LocationCategory::get()->Count() > 0 && $locatorCategories && $locatorCategories->Count() != 1) {
if (LocationCategory::get()->count() > 0 && $locatorCategories && $locatorCategories->count() != 1) {
$categories = LocationCategory::get();

if ($categories->count() > 0) {
Expand Down

0 comments on commit 73badf2

Please sign in to comment.