/** * put your comment there... * * @param mixed $tblPackage * @param mixed $packageId */ protected function save(CJTxTable &$tblPckObjects, $packageId) { // Initialize. $register =& $this->register(); // Add Package Ref record, // only if this template is not bundled with the package. $data = array('packageId' => $packageId, 'objectId' => $register[$this->objectIdKeyName], 'objectType' => $this->objectTypeName); $tblPckObjects->loadAsKey($data); if (!$tblPckObjects->get('relType')) { // Reset object. $tblPckObjects->setItem(); // Save package object ref. parent::save($tblPckObjects, $packageId); } // Chain. return $this; }