예제 #1
0
 /**
  * Changes The item data (in the DB) from one location to another.
  *
  * @param CMS_resource $resource The resource concerned by the data location change
  * @param string $locationFrom The starting location among "edited", "edition", "public", "archived", "deleted"
  * @param string $locationTo The ending location among "edited", "edition", "public", "archived", "deleted"
  * @param boolean $copyOnly If true, data is not deleted from the original location
  * @return void
  * @access private
  */
 protected function _changeDataLocation($resource, $locationFrom, $locationTo, $copyOnly = false)
 {
     if (is_array($this->_resourceInfo) && $this->_resourceInfo) {
         if (!parent::_changeDataLocation($resource, $locationFrom, $locationTo, $copyOnly)) {
             return false;
         }
         foreach ($this->_resourceInfo as $tableName => $tableInfo) {
             //move the data
             CMS_modulesCatalog::moveResourceData($this, $tableName, $tableInfo['key'], $resource->getID(), $locationFrom, $locationTo, $copyOnly);
         }
     }
 }