Skip to content
Snippets Groups Projects

Dev#75882 minsoc faire des filtres sur des facettes et des domaines au moment de la recherche s2

Compare and Show latest version
2 files
+ 33
82
Preferences
Compare changes
Files
2
@@ -117,6 +117,7 @@ class Class_TableDescription {
$description = array_merge(['attribute' => '',
'callback' => null,
'options' => '',
'sortable' => true,
'sort_attribute' => ''],
$description);
$this
@@ -257,11 +258,13 @@ abstract class Class_TableDescription_ColumnAbstract {
class Class_TableDescription_ColumnForAttribute extends Class_TableDescription_ColumnAbstract {
protected
$_attribute,
$_sortable = true,
$_sort_attribute;
public function __construct($label, $description, $table_description) {
parent::__construct($label, $description, $table_description);
$this->_attribute = $description['attribute'];
$this->_sortable = $description['sortable'];
$this->_sort_attribute = $description['sort_attribute']
? $description['sort_attribute']
: $this->_attribute;
@@ -269,7 +272,7 @@ class Class_TableDescription_ColumnForAttribute extends Class_TableDescription_C
public function getLabel() {
return $this->_table_description->isSorterServer()
return ($this->_table_description->isSorterServer() && $this->_sortable)
? $this->_table_description->withOrder(parent::getLabel(), $this->_sort_attribute)
: parent::getLabel();
}