/** * Undo changes made in representation editor to representation media * */ public function RevertMedia() { list($vn_object_id, $t_object) = $this->_initView(); $pn_representation_id = $this->request->getParameter('representation_id', pInteger); if (!$vn_object_id) { $vn_object_id = 0; } $t_rep = new ca_object_representations($pn_representation_id); if ($t_rep->removeMediaTransformations('media')) { $va_response = array('action' => 'revert', 'status' => 0); } else { $va_response = array('action' => 'revert', 'status' => 10); } $this->view->setVar('response', $va_response); $this->render('object_representation_process_media_json.php'); }