/** * Delete config options by module * * @param string $name * @return boolean */ function deleteByModule($name) { $options = ConfigOptions::find(array('conditions' => array('module = ?', $name))); if (is_foreachable($options)) { foreach ($options as $option) { $option->delete(); } // foreach } // if }