/** * Inherit from parent object. Name, Package, Class cannot be inherited * * @return void */ protected function inheritParentObj() { if (!$this->inheritFrom) { return; } $parentObj = Openbiz::getObject($this->inheritFrom); $this->objectDescription = $this->objectDescription ? $this->objectDescription : $parentObj->objectDescription; $this->searchRule = $this->searchRule ? $this->searchRule : $parentObj->searchRule; $this->baseSearchRule = $this->searchRule; $this->sortRule = $this->sortRule ? $this->sortRule : $parentObj->sortRule; $this->baseSortRule = $this->sortRule; $this->otherSQLRule = $this->otherSQLRule ? $this->otherSQLRule : $parentObj->otherSQLRule; $this->accessRule = $this->accessRule ? $this->accessRule : $parentObj->accessRule; $this->updateCondition = $this->updateCondition ? $this->updateCondition : $parentObj->updateCondition; $this->deleteCondition = $this->deleteCondition ? $this->deleteCondition : $parentObj->deleteCondition; $this->databaseAliasName = $this->databaseAliasName ? $this->databaseAliasName : $parentObj->databaseAliasName; $this->mainTableName = $this->mainTableName ? $this->mainTableName : $parentObj->mainTableName; $this->idGeneration = $this->idGeneration ? $this->idGeneration : $parentObj->idGeneration; $this->stateless = $this->stateless ? $this->stateless : $parentObj->stateless; $this->dataPermControl = $this->dataPermControl ? $this->dataPermControl : $parentObj->dataPermControl; $this->bizRecord->merge($parentObj->bizRecord); foreach ($this->bizRecord as $field) { $field->adjustBizObjName($this->objectName); } $this->tableJoins->merge($parentObj->tableJoins); $this->objReferences->merge($parentObj->objReferences); $this->parameters->merge($parentObj->parameters); }
/** * Merge with another BizRecord object. Used in metedata inheritance. * * @param BizRecord $anotherMIObj to be merged BizRecord object * @return void */ public function merge(&$anotherMIObj) { parent::merge($anotherMIObj); $this->_initSetup(); }