/** * */ function cfForDesign(&$dbHandler, $cfSet) { static $mgr; if (!$mgr) { $mgr = new cfield_mgr($dbHandler); } $ret = null; foreach ($cfSet as $id => $val) { $xx = $mgr->get_by_id($id); if ($xx[$id]['enable_on_design']) { $ret[$id] = $val; } } return $ret; }