function insert(&$record, $force = false, $updateOnlyChanged = false) { if ($record->isNew()) { $record->set('com_created', time()); } else { $record->set('com_modified', time()); } return parent::insert($record, $force, $updateOnlyChanged); }
function insert(&$record, $force = false, $updateOnlyChanged = false) { if ($result = parent::insert($record, $force, $updateOnlyChanged)) { $id = $record->get('tpl_id'); $tplSourceHandler =& NBFrame::getHandler('NBFrame.xoops.TplSource', $this->mEnvironment); if (!($tplSourceObject =& $tplSourceHandler->get($id))) { $tplSourceObject =& $tplSourceHandler->create(); $tplSourceObject->set('tpl_id', $id); } $tplSourceObject->set('tpl_source', $record->get('tpl_source')); $result = $tplSourceHandler->insert($tplSourceObject, $force); } return $result; }
function insert($bid, $modules, $force = false) { $this->deleteBlock($bid); foreach ($modules as $mid) { $object =& $this->create(); $object->set('block_id', $bid); $object->set('module_id', $mid); $result = parent::insert($object, $force); unset($object); if (!$result) { break; } } }
function _requestKeyValue($method = 'POST') { $keyArray = array(); foreach ($this->mObjectKeyFields as $key) { $attrib = $this->mObjectHandler->getKeyAttrib($key); if ($attrib == XOBJ_DTYPE_INT) { $this->mRequest->defParam($key, $method, 'int', NBFRAME_NO_DEFAULT_PARAM, true); } else { if ($attrib == XOBJ_DTYPE_FLOAT) { $this->mRequest->defParam($key, $method, 'float', NBFRAME_NO_DEFAULT_PARAM, true); } else { $this->mRequest->defParam($key, $method, 'var', NBFRAME_NO_DEFAULT_PARAM, true); } } if ($this->mRequest->hasError()) { return null; } $keyArray[$key] = $this->mRequest->getParam($key); } return $keyArray; }
function delete(&$object, $force = false) { $result = parent::delete(&$object, $force = false); if ($result) { $blockModuleLinkHandler =& NBFrame::getHandler('NBFrame.xoops.BlockModuleLink', $this->mEnvironment); $result = $blockModuleLinkHandler->deleteBlock($object->get('bid')); } return $result; }
/** * テーブルの条件検索による複数レコード削除 * * @param object $criteria {@link NBFrameObject} 検索条件 * @param bool $force POSTメソッド以外で強制更新する場合はture * * @return bool 成功の時は TRUE */ function deleteAll($criteria = null, $force = false) { $GLOBALS['_NBFrameTableCache']->clear($this->mTableName); $this->mFullCached = false; return parent::deleteAll($criteria, $force); }