get all collections db ids

This commit is contained in:
Jacson Passold 2017-12-08 13:35:55 -02:00
parent 3160ac9eb7
commit e41a3407d8
1 changed files with 11 additions and 0 deletions

View File

@ -267,6 +267,17 @@ abstract class Repository {
return $property;
}
public static function get_collections_db_identifier()
{
global $Tainacan_Collections;
$collections = $Tainacan_Collections->fetch([], 'OBJECT');
$cpts = [];
foreach($collections as $col) {
$cpts[$col->get_db_identifier()] = $col;
}
return $cpts;
}
/**
* @param $object
* @return mixed