public function replaceStruct(PwDesignStructureDm $dm) { $resource = $dm->beforeAdd(); if ($resource instanceof PwError) { return $resource; } return $this->_getDao()->replace($dm->getData()); }