Example #1
0
 public function Tinhte_XenTag_actionSave(XenResource_DataWriter_Resource $dw)
 {
     /* @var $tagModel Tinhte_XenTag_Model_Tag */
     $tagModel = $this->getModelFromCache('Tinhte_XenTag_Model_Tag');
     $resource = $dw->getMergedData();
     if ($tagModel->canTagResource($resource)) {
         $tags = $tagModel->processInput($this->_input);
         if ($tags !== false) {
             $dw->Tinhte_XenTag_setTags($tags);
         }
     }
     // just to be safe...
     unset($GLOBALS[Tinhte_XenTag_Constants::GLOBALS_CONTROLLERPUBLIC_RESOURCE_SAVE]);
 }