本文整理汇总了PHP中CMbObject::store方法的典型用法代码示例。如果您正苦于以下问题:PHP CMbObject::store方法的具体用法?PHP CMbObject::store怎么用?PHP CMbObject::store使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMbObject
的用法示例。
在下文中一共展示了CMbObject::store方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: store
/**
* @see parent::store()
*/
function store()
{
if ($this->fieldModified("content") || !$this->last_modified) {
$this->last_modified = CMbDT::dateTime();
}
return parent::store();
}
示例2: store
/**
* @see parent::store()
*/
function store()
{
if (!$this->_id) {
$this->group_id = CGroups::loadCurrent()->_id;
}
return parent::store();
}
示例3: store
/**
* @see parent::store()
*/
function store()
{
if ($msg = parent::store()) {
return $msg;
}
if ($this->_duplicate && $this->_type_has) {
$this->duplicate();
}
}
示例4: store
/**
* @see parent::store()
*/
function store()
{
if (!$this->creation_datetime) {
$this->creation_datetime = CMbDT::dateTime();
}
if ($msg = parent::store()) {
return $msg;
}
}
示例5: storeObject
/**
* Fonction utilitaire pour la sauvegarde rapide d'un object avec génération du message
*
* @param CMbObject $object Objet à enregister
*
* @return void
*/
function storeObject($object)
{
$title = $object->_id ? "-msg-modify" : "-msg-create";
if ($msg = $object->store()) {
CAppUI::setMsg($msg, UI_MSG_ERROR);
echo CAppUI::getMsg();
CApp::rip();
}
CAppUI::setMsg(CAppUI::tr(get_class($object) . $title), UI_MSG_OK);
}
示例6: store
/**
* @see parent::store()
*/
function store()
{
$is_new = !$this->_id;
if ($msg = parent::store()) {
return $msg;
}
if ($is_new || $this->fieldModified("name")) {
CExObject::clearLocales();
}
return null;
}
示例7: store
/**
* @see parent::store()
*/
function store()
{
$this->completeField("datetime_start");
if (!$this->datetime_start) {
$this->datetime_start = CMbDT::dateTime();
}
if (!$this->_id) {
$rand = CMbSecurity::getRandomString(16);
$this->hash = CMbSecurity::hash(CMbSecurity::SHA1, $rand);
}
return parent::store();
}
示例8: storeObject
/**
* Fonction utilitaire pour la sauvegarde rapide d'un object avec génération du message
*
* @param CMbObject $object Objet à enregister
*
* @return void
*/
function storeObject($object)
{
$title = $object->_id ? "-msg-modify" : "-msg-create";
if ($msg = $object->store()) {
CAppUI::setMsg($msg, UI_MSG_ERROR);
echo CAppUI::getMsg();
// Il peut y avoir un msg de retour postérieur à la création de l'objet
// On continue donc le processus de création de la naissance
//CApp::rip();
}
CAppUI::setMsg(CAppUI::tr(get_class($object) . $title), UI_MSG_OK);
}
示例9: store
/**
* @see parent::store()
*/
function store()
{
if (!$this->_id) {
$this->updatePlainFields();
$etat_dent = new CEtatDent();
$etat_dent->dent = $this->dent;
$etat_dent->dossier_medical_id = $this->dossier_medical_id;
if ($etat_dent->loadMatchingObject()) {
$this->_id = $etat_dent->_id;
}
}
return parent::store();
}
示例10: store
/**
* @see parent::store()
*/
function store()
{
$this->completeField("operation_id");
if ($this->_id && $this->etat != "a_commander") {
if (CMediusers::get()->_id == $this->loadRefOperation()->chir_id) {
$this->etat = "modify";
}
}
// Standard storage
if ($msg = parent::store()) {
return $msg;
}
}
示例11: store
/**
* @see parent::store()
*/
function store()
{
// Transfert de séjours vers un autre technicien
if ($this->_transfer_id) {
foreach ($this->loadRefsSejours(CMbDT::date()) as $_sejour) {
$bilan = $_sejour->loadRefBilanSSR();
$bilan->technicien_id = $this->_transfer_id;
if ($msg = $bilan->store()) {
return $msg;
}
}
}
return parent::store();
}
示例12: store
/**
* @see parent::store()
*/
function store()
{
$create = $this->_id;
// Standard store
if ($msg = parent::store()) {
return $msg;
}
if (!$create && count($this->_factures)) {
//$this->completeField("journal_id");
foreach ($this->_factures as $facture) {
$link = new CJournalLiaison();
$link->journal_id = $this->journal_id;
$link->object_id = $facture->_id;
$link->object_class = $facture->_class;
if ($msg = $link->store()) {
return $msg;
}
}
}
}
示例13: storeMbObject
/**
* Stores a CMbObject from a hash
*
* @param array $hash The associative array
* @param boolean $force Force the object re-importation
*
* @return string The store message
*/
function storeMbObject($hash, $force = false)
{
$db_id = $this->getId($hash);
$object = $this->getMbObject($db_id);
// If object was already imported
if (!$force && $object->_id) {
return null;
}
$this->mapHashToMbObject($hash, $object);
if (isset($this->_mb_object->_failed)) {
return;
}
$this->_mb_object->repair();
if ($msg = $this->_mb_object->store()) {
CAppUI::setMsg($msg, UI_MSG_WARNING);
return $msg;
} else {
CAppUI::setMsg("{$this->_mb_object->_class}-msg-create");
}
self::$_count_stored++;
return self::storeIdExt($this->_mb_object, $this->getId($hash));
}
示例14: deleteActe
/**
* Delete acte
*
* @param CActe $acte Acte
* @param CMbObject $object Object
* @param CIdSante400 $idex Idex
*
* @return String|null
*/
function deleteActe($acte, $object, $idex)
{
if ($msg = $idex->delete()) {
return $msg;
}
if ($msg = $acte->delete()) {
return $msg;
}
if ($msg = $object->store()) {
return $msg;
}
return null;
}
示例15: store
/**
* @see parent::store()
*/
function store()
{
if ($this instanceof CSejour || $this instanceof COperation) {
global $can;
$this->loadOldObject();
$this->completeField("cloture_activite_1", "cloture_activite_4", 'codes_ccam');
if (!$can->admin && CAppUI::conf("dPsalleOp CActeCCAM signature") && ($this->cloture_activite_1 || $this->cloture_activite_4) && $this->fieldModified("codes_ccam") && strcmp($this->codes_ccam, $this->_old->codes_ccam)) {
$new_code = substr($this->codes_ccam, strlen($this->_old->codes_ccam) + 1);
$code_ccam = new CDatedCodeCCAM($new_code);
$code_ccam->getRemarques();
$activites = $code_ccam->getActivites();
if (isset($activites[1]) && $this->cloture_activite_1) {
CAppUI::setMsg("Impossible de rajouter un code : l'activité 1 est clôturée", UI_MSG_ERROR);
echo CAppUI::getMsg();
CApp::rip();
}
if (isset($activites[4]) && $this->cloture_activite_4) {
CAppUI::setMsg("Impossible de rajouter un code : l'activité 4 est clôturée", UI_MSG_ERROR);
echo CAppUI::getMsg();
CApp::rip();
}
}
}
// Standard store
if ($msg = parent::store()) {
return $msg;
}
if ($this->_delete_actes && $this->_id) {
if ($msg = $this->deleteActes()) {
return $msg;
}
}
return null;
}