Commit 238d06dc authored by Ghislain Loas's avatar Ghislain Loas

Merge branch 'hotline#110044_site_demofr_lenteurs' into 'hotline'

Hotline#110044 site demofr lenteurs

See merge request !3505
parents 1c7f1faf 27b70af5
Pipeline #10093 passed with stage
in 44 minutes and 55 seconds
- ticket #110044 : Magasin de themes : Optimisation de l'affichage du resultat de recherche
\ No newline at end of file
......@@ -210,7 +210,10 @@ class Class_Profil extends Storm_Model_Abstract {
$_default_cfg_notice_cache,
$_default_cfg_accueil_cache,
$_raw_cfg_cache = [],
$_loaded_modules_cache = [];
$_loaded_modules_cache = [],
$_cfg_modules_array_cache,
$_cfg_accueil_array_cache,
$_cfg_menus_array_cache;
/**
......@@ -1089,7 +1092,9 @@ class Class_Profil extends Storm_Model_Abstract {
* @return array
*/
public function getCfgMenusAsArray() {
return $this->_getCfgAsArrayNamed('Menus');
return $this->_cfg_menus_array_cache
? $this->_cfg_menus_array_cache
: ($this->_cfg_menus_array_cache = $this->_getCfgAsArrayNamed('Menus'));
}
......@@ -1118,7 +1123,9 @@ class Class_Profil extends Storm_Model_Abstract {
* @return array
*/
public function getCfgAccueilAsArray() {
return $this->_getCfgAsArrayNamed('Accueil');
return $this->_cfg_accueil_array_cache
? $this->_cfg_accueil_array_cache
: ($this->_cfg_accueil_array_cache = $this->_getCfgAsArrayNamed('Accueil'));
}
......@@ -1140,7 +1147,9 @@ class Class_Profil extends Storm_Model_Abstract {
* @return array
*/
public function getCfgModulesAsArray() {
return $this->_getCfgAsArrayNamed('Modules');
return $this->_cfg_modules_array_cache
? $this->_cfg_modules_array_cache
: ($this->_cfg_modules_array_cache = $this->_getCfgAsArrayNamed('Modules'));
}
......@@ -2535,6 +2544,9 @@ class Class_Profil extends Storm_Model_Abstract {
$this->_default_cfg_menus_cache = [];
$this->_default_cfg_notice_cache = [];
$this->_default_cfg_accueil_cache = [];
$this->_cfg_modules_array_cache = null;
$this->_cfg_accueil_array_cache = null;
$this->_cfg_menus_array_cache = null;
$this->_raw_cfg_cache = [];
$this->_loaded_modules_cache = [];
return $this;
......
......@@ -48,10 +48,7 @@ class Intonation_Library_View_Wrapper_Author extends Intonation_Library_View_Wra
public function getPicture() {
$description = new Class_CodifAuteur_Description($this->_model);
return $description->isBiographyDisabled()
? ''
: $this->_model->getThumbnailUrl();
return $this->_model->getThumbnailUrl();
}
......
......@@ -24,10 +24,15 @@ class Intonation_Library_View_Wrapper_Record extends Intonation_Library_View_Wra
protected
$_selectable_action = false,
$_main_title,
$_description,
$_badges,
$_allow_XSL = false;
public function getMainTitle() {
return $this->_model->getTitrePrincipal(' ') . $this->_model->getSubtitle();
return $this->_main_title ?
$this->_main_title :
($this->_main_title = $this->_model->getTitrePrincipal(' ') . $this->_model->getSubtitle());
}
......@@ -82,6 +87,10 @@ class Intonation_Library_View_Wrapper_Record extends Intonation_Library_View_Wra
public function getDescription() {
if ($this->_description)
return $this->_description;
$xsl = (new Class_Notice_Xsl($this->_model, Class_Profil::getCurrentProfil()))
->beSearchResult();
......@@ -90,7 +99,7 @@ class Intonation_Library_View_Wrapper_Record extends Intonation_Library_View_Wra
: $this->_view->truncate($this->_model->getResume(),
['class' => 'model_description_' . get_class($this->_model)]);
return $this->getBadges() . $description;
return ($this->_description = $this->getBadges() . $description);
}
......@@ -130,6 +139,8 @@ class Intonation_Library_View_Wrapper_Record extends Intonation_Library_View_Wra
public function getBadges() {
if ($this->_badges)
return $this->_badges;
$badges = [((new Intonation_Library_Badge)
->setTag('a')
->setClass('warning fs_1em record_doctype')
......@@ -194,7 +205,7 @@ class Intonation_Library_View_Wrapper_Record extends Intonation_Library_View_Wra
$badges = $this->_addSerieBadges($badges);
return $this->_view->renderBadges($badges, $this);
return $this->_badges = $this->_view->renderBadges($badges,$this);
}
......
Markdown is supported
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