コード例 #1
0
ファイル: Config.php プロジェクト: mtornero/slowshop
 /**
  * Creates a version of the current object and saves it.
  *
  * @param   ConnectionInterface $con the connection to use
  *
  * @return  ChildConfigVersion A version object
  */
 public function addVersion($con = null)
 {
     $this->enforceVersion = false;
     $version = new ChildConfigVersion();
     $version->setConfigId($this->getConfigId());
     $version->setConfigCategoryId($this->getConfigCategoryId());
     $version->setConfigKey($this->getConfigKey());
     $version->setConfigValue($this->getConfigValue());
     $version->setConfigFormat($this->getConfigFormat());
     $version->setVersion($this->getVersion());
     $version->setConfig($this);
     $version->save($con);
     return $version;
 }