Ejemplo n.º 1
0
 /**
  * Creates a version of the current object and saves it.
  *
  * @param   ConnectionInterface $con the connection to use
  *
  * @return  ChildContentAreaVersion A version object
  */
 public function addVersion($con = null)
 {
     $this->enforceVersion = false;
     $version = new ChildContentAreaVersion();
     $version->setContent($this->getContent());
     $version->setactiveVersion($this->getactiveVersion());
     $version->setId($this->getId());
     $version->setVersion($this->getVersion());
     $version->setVersionCreatedAt($this->getVersionCreatedAt());
     $version->setVersionCreatedBy($this->getVersionCreatedBy());
     $version->setVersionComment($this->getVersionComment());
     $version->setContentArea($this);
     $version->save($con);
     return $version;
 }