pass params when loading Objects_Indexed_By_Id

This commit is contained in:
Isaac Connor 2020-08-31 10:16:35 -04:00
parent 4fcece6b69
commit cce0ab1464
1 changed files with 2 additions and 2 deletions

View File

@ -147,9 +147,9 @@ class ZM_Object {
Logger::Debug("Unsset $class " . $object->Id() . " " . count($object_cache[$class]));
}
public static function Objects_Indexed_By_Id($class) {
public static function Objects_Indexed_By_Id($class, $params=null) {
$results = array();
foreach ( ZM_Object::_find($class, null, array('order'=>'lower(Name)')) as $Object ) {
foreach ( ZM_Object::_find($class, $params, array('order'=>'lower(Name)')) as $Object ) {
$results[$Object->Id()] = $Object;
}
return $results;