create collection attribute for filters ordination

This commit is contained in:
Eduardo humberto 2018-02-26 10:40:17 -03:00
parent e0c630475c
commit 3c24516905
2 changed files with 27 additions and 1 deletions

View File

@ -254,7 +254,16 @@ class Collection extends Entity {
function get_fields_order() {
return $this->get_mapped_property('fields_order');
}
/**
* Get collection filters ordination
*
* @return string
*/
function get_filters_order() {
return $this->get_mapped_property('filters_order');
}
/**
* Get collection moderators ids
*
@ -394,6 +403,16 @@ class Collection extends Entity {
function set_fields_order($value) {
$this->set_mapped_property('fields_order', $value);
}
/**
* Set collection filters ordination
*
* @param [string] $value
* @return void
*/
function set_filters_order($value) {
$this->set_mapped_property('filters_order', $value);
}
/**
* Set collection moderators ids

View File

@ -138,6 +138,13 @@ class Collections extends Repository {
'description'=> __('Collection fields ordination', 'tainacan'),
//'validation' => v::stringType(),
],
'filters_order' => [
'map' => 'meta',
'title' => __('Ordination filters', 'tainacan'),
'type' => 'string',
'description'=> __('Collection filters ordination', 'tainacan'),
//'validation' => v::stringType(),
],
/*
Isnt it just post status private?