[-] Installer : Fix country_to_timezone in last step

[+] BO : now AdminProducts and AdminCategories are separated from AdminCatalog
[+] FO : new method Category::getAllChildren() (the return value is an array, but can evolve to a collection
// Uses of Media:: in header.inc.php
This commit is contained in:
mMarinetti
2011-10-06 13:02:24 +00:00
parent e03c8fdf4d
commit 4012b88f6b
9 changed files with 286 additions and 278 deletions
+13
View File
@@ -652,6 +652,19 @@ class CategoryCore extends ObjectModel
ORDER BY `position` ASC');
}
/** return an array of all children of the current category
*
* @return array rows of table category
* @todo return hydrateCollection
*/
public function getAllChildren()
{
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
SELECT *
FROM `'._DB_PREFIX_.'category`
WHERE '. $this->nleft . ' < nleft AND nright < '. $this->nright);
}
/**
* This method allow to return children categories with the number of sub children selected for a product
*