protected function getSerializableProperties() { $properties = parent::getSerializableProperties(); // We remove nested objects as we can't update it unset($properties['article']); unset($properties['user']); return $properties; }
/** * Associate $object to current model instance. * * @param \NwWebsite\Models\Model $object */ public function associate(Model $object) { $resourcePath = $this->getResourcePath() . $object->getResourcePath(); $di = Di::getInstance(); $di->api->createResource($resourcePath, null); }