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

hotline #66742 : fix failures

parent 65c095e7
Branches
Tags
2 merge requests!2391Hotline master,!2387Hotline#66742 la madeleine pbm sur kiosque et affichage de resultats
Pipeline #2790 failed with stage
in 20 minutes and 39 seconds
......@@ -38,10 +38,9 @@ class ZendAfi_Form_Configuration_Menu_Entry extends ZendAfi_Form {
}
public function populate($datas) {
public function populate(array $datas) {
$this
->addToHeadGroup(['libelle',
'use_profil'])
->addToHeadGroup(['libelle', 'use_profil'])
->addToStyleGroup(['picto']);
return parent::populate($datas);
......
......@@ -19,7 +19,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class ZendAfi_Form_Configuration_Menu_News extends ZendAfi_Form_Configuration_Menu_Entry {
class ZendAfi_Form_Configuration_Menu_News
extends ZendAfi_Form_Configuration_Menu_Entry {
public function init() {
parent::init();
......@@ -55,7 +56,7 @@ class ZendAfi_Form_Configuration_Menu_News extends ZendAfi_Form_Configuration_Me
}
public function populate($datas) {
public function populate(array $datas) {
$this
->addElement('treeSelect',
'articles_selector',
......
......@@ -36,23 +36,31 @@ class ZendAfi_Form_Configuration_NavWidget extends ZendAfi_Form {
->addElement('DragAndDrop',
'children',
['label' => $this->_('Eléments du menu')]);
['label' => $this->_('Eléments du menu'),
'entityfactory' => function($value) {
return (new Class_Entity())
->setId('children')
->setOptions(['sticky_available' => true])
->setSelectedHeader($this->_('Sélectionnés'))
->setSelected($value ? $value : [])
->setAvailableHeader($this->_('Disponibles'))
->setAvailable((new Class_Systeme_ModulesMenu())->getEntries())
;
}])
->addToHeadGroup(['libelle'])
->addToSelectionGroup(['children'])
->addToStyleGroup(['picto'])
;
}
public function populate($datas) {
$this->addToHeadGroup(['libelle'])
->addToSelectionGroup(['children'])
->addToStyleGroup(['picto']);
parent::populate($datas);
$this->getElement('children')
->setValue((new Class_Entity())
->setId('children')
->setOptions(['sticky_available' => true])
->setSelectedHeader($this->_('Sélectionnés'))
->setSelected(isset($datas['Children']) ? $datas['Children'] : [])
->setAvailableHeader($this->_('Disponibles'))
->setAvailable((new Class_Systeme_ModulesMenu())->getEntries()));
public function populate(array $data) {
parent::populate($data);
if (isset($data['Children']))
$this->getElement('children')->setValue($data['Children']);
return $this;
}
}
\ No newline at end of file
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