[+] Classes: Add ObjectModel::hydrateCollection() in order to transform arrays from sql queries return in list of objects

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8877 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-09-29 13:23:54 +00:00
parent 5292c8547b
commit 42c5603cc3
11 changed files with 160 additions and 44 deletions
+12 -10
View File
@@ -107,15 +107,6 @@ class AddressControllerCore extends FrontController
$_POST['firstname'] = $this->context->customer->firstname;
$_POST['lastname'] = $this->context->customer->lastname;
}
if ($this->ajax && count($this->errors))
{
$return = array(
'hasError' => !empty($this->errors),
'errors' => $this->errors
);
die(Tools::jsonEncode($return));
}
}
/**
@@ -365,5 +356,16 @@ class AddressControllerCore extends FrontController
'vat_display' => $vat_display,
));
}
}
public function displayAjax()
{
if (count($this->errors))
{
$return = array(
'hasError' => !empty($this->errors),
'errors' => $this->errors
);
die(Tools::jsonEncode($return));
}
}
}