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

dev #53936 : doc_types list ordered

parent ed2eb718
Branches
Tags
Pipeline #342 failed with stage
in 8 minutes and 56 seconds
......@@ -23,6 +23,7 @@ class ZendAfi_View_Helper_TagListeCoches extends ZendAfi_View_Helper_BaseHelper
protected
$selected_all_means_nothing = true,
$_name,
$_type,
$_definition,
$_possibles,
$_selection = '',
......@@ -62,6 +63,7 @@ class ZendAfi_View_Helper_TagListeCoches extends ZendAfi_View_Helper_BaseHelper
return '';
$this->_name = $name;
$this->_type = $rubrique;
Class_ScriptLoader::getInstance()->addAdminScript('tag_selection');
$this->_definition = $rubriques[$rubrique];
$this->_possibles = $this->_getList();
......@@ -152,6 +154,14 @@ class ZendAfi_View_Helper_TagListeCoches extends ZendAfi_View_Helper_BaseHelper
protected function _getList() {
$instances = $this->_getInstances();
if ('type_doc' == $this->_type)
usort($instances,
function($a, $b)
{
return strtolower($a->getLabel()) > strtolower($b->getLabel());
});
$list = [];
foreach($instances as $instance) {
......
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