/** * {@inheritdoc} * @see AbstractEntity::save() */ public function save() { parent::save(); if (!empty($this->_settings)) { $this->_settings->save(); } }
/** * Unlocks this farm * * @param User $user The User on whose behalf the lock unset * @return Farm */ public function unlock(User $user) { $this->_settings->saveSettings([FarmSetting::LOCK => '', FarmSetting::LOCK_BY => '', FarmSetting::LOCK_UNLOCK_BY => $user->id, FarmSetting::LOCK_COMMENT => '', FarmSetting::LOCK_RESTRICT => '']); return $this; }
/** * {@inheritdoc} * @see AbstractEntity::save() */ public function save() { try { $this->db()->BeginTrans(); parent::save(); if (!empty($this->_properties)) { $this->_properties->save(); } $this->db()->CommitTrans(); } catch (Exception $e) { $this->db()->RollbackTrans(); throw $e; } }
/** * {@inheritdoc} * @see AbstractEntity::save() */ public function save() { $this->setupRole(); $this->setupAlias(); $this->setupScaling(); $this->setupBehaviors(); $this->setupPolling(); parent::save(); $this->setupAnalytics(); if (!empty($this->_settings)) { $this->_settings->save(); } }
/** * {@inheritdoc} * @see AbstractEntity::save() */ public function save() { parent::save(); if (!empty($this->_properties)) { $this->_properties->save(); } }