DocMiddleObj($id_parent, $id); $this->_cacheUrlFormat = '%s'; } function insert($data = null, $files = null) { parent::insert($data, $files); $this->_data['alias_full'] = $this->_getPath2Doc($this->id); $cfs = $this->_getContentFields(); if (!empty($cfs)) { foreach ($cfs as $cf) { $this->_cacheFields[] = "{$cf}[\"eng\"]"; } } $this->_cacheItem(); return $this->id; } function update($data = null, $files = null) { $res = parent::update($data, $files); $this->_data['alias_full'] = $this->_getPath2Doc($this->id); $cfs = $this->_getContentFields(); if (!empty($cfs)) { foreach ($cfs as $cf) { $this->_cacheFields[] = "{$cf}[\"eng\"]"; } } $this->_cacheItem(); return $res; } function delete() { $this->_cacheDelete(); return parent::delete(); } function _getContentFields() { $res = array(); if (is_array($this->_data) && !empty($this->_data)) { foreach ($this->_data as $key => $val) { if (strpos($key, 'content') === 0) { $res[] = $key; } } } return $res; } } ?>