add new get_filters() method to collection
This commit is contained in:
parent
e2e57d05bd
commit
d9d33987db
|
@ -477,6 +477,22 @@ class Collection extends Entity {
|
||||||
return $Tainacan_Metadata->fetch_by_collection( $this );
|
return $Tainacan_Metadata->fetch_by_collection( $this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get collection filters.
|
||||||
|
*
|
||||||
|
* Returns an array of \Entity\Filter objects, representing all the filters of the collection.
|
||||||
|
*
|
||||||
|
* @see \Tainacan\Repositories\Filters->fetch()
|
||||||
|
*
|
||||||
|
* @return [\Tainacan\Entities\Filter] array
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
|
function get_filters() {
|
||||||
|
$Tainacan_Filters = \Tainacan\Repositories\Filters::get_instance();
|
||||||
|
|
||||||
|
return $Tainacan_Filters->fetch_by_collection( $this );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the two core metadata of the collection (title and description)
|
* Get the two core metadata of the collection (title and description)
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue