Skip to content
Snippets Groups Projects
Commit 52f4ea7a authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

rel #13914 : override getCategorie instead of introducing another getter

parent 765c2974
Branches
Tags
6 merge requests!258Dev/13872 Orphee Allow Hold Available Items,!215Dev#12992 Custom Fields,!214Hotline 6.46,!212Hotline Indexation Mots Vide,!210Hotline#13914 Album Link Config Menu,!209Hotline#13914 Album Link Config Menu
......@@ -352,9 +352,8 @@ class Class_Album extends Storm_Model_Abstract {
/** @return array */
public function getHierarchy() {
$hierarchy = [];
$this->getCategory()->getHierarchyOn($hierarchy);
$this->getCategorie()->getHierarchyOn($hierarchy);
return $hierarchy;
}
......@@ -988,23 +987,16 @@ class Class_Album extends Storm_Model_Abstract {
* @return string
*/
public function getAbsolutePath() {
return $this->getCategory()->getAbsolutePath().'>'.$this->getTitre();
return $this->getCategorie()->getAbsolutePath() . '>' . $this->getTitre();
}
public function getCategory() {
if ($cat=$this->getCategorie())
return $cat;
if ($cat=Class_AlbumCategorie::find($this->getCatId()))
return $cat;
$cat=Class_AlbumCategorie::newInstanceWithId($this->getCatId())
->setLibelle('Albums non classés')
->setSousCategories([]);
return $cat;
public function getCategorie() {
return ($parent = parent::getCategorie()) ?
$parent : Class_AlbumCategorie::defaultCategory();
}
public function setAnnee($annee) {
if (!$annee)
return $this->_set('annee', '');
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment