public function move_objs($params) { $objs = json_decode($params["json"], true); $sub = $params["sub"]; $templates = new Model_Template($this->registry); $objects = new Model_Object($this->registry); if (count($objs) > 0) { foreach ($objs as $key => $val) { $oid = mb_substr($key, 4, mb_strlen($key) - 5); $objects->moveObj($oid, $sub); } } }