public function setCurrentVersion($version)
    {
        $version = min($this->getMaxVersion(), $version);
        $version = max($version, 0);
        $this->_getVersion()->version = $version;
        $this->_getVersion()->saveEntity();
    }
public function setCurrentVersion($version)
    {
        $version = min($this->getMaxVersion(), $version);
        $version = max($version, 0);
        $this->_getVersion()->version = $version;
        $this->_getVersion()->saveEntity();
    }
public function setCurrentVersion ( $ version ) { $ version = min ( $ this -> getMaxVersion ( ) , $ version ) ; $ version = max ( $ version , 0 ) ; $ this -> _getVersion ( ) -> version = $ version ; $ this -> _getVersion ( ) -> saveEntity ( ) ; }
Set the current version.

@param int $version
Set the current version .