Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REFACTOR various class names and method call names #99

Merged
merged 1 commit into from
Jul 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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