/** * Duplicate back refs * * @param CMbObject $object Object to duplicate back refs of * @param string $backname Back reference name * @param string $fwd_field Forward field name * @param mixed $fwd_value Forward field value * @param array $exclude_fields Excluded fields * * @return void */ private function duplicateBackRefs(CMbObject $object, $backname, $fwd_field, $fwd_value, $exclude_fields = array()) { $new = null; foreach ($object->loadBackRefs($backname) as $_back) { /** @var CMbObject $_back */ $this->duplicateObject($_back, $fwd_field, $fwd_value, $new, $exclude_fields); } }