public function BindResource(BookableResource $resource) { $this->Set('resourceName', $resource->GetName()); $this->Set('description', $resource->GetDescription()); $this->Set('notes', $resource->GetNotes()); $this->Set('contactInformation', $resource->GetContact()); $this->Set('locationInformation', $resource->GetLocation()); $this->Set('allowMultiday', $resource->GetAllowMultiday()); $this->Set('minimumDuration', $resource->GetMinLength()); $this->Set('maximumDuration', $resource->GetMaxLength()); $this->Set('maxParticipants', $resource->GetMaxParticipants()); $this->Set('maximumNotice', $resource->GetMaxNotice()); $this->Set('minimumNotice', $resource->GetMinNotice()); $this->Set('requiresApproval', $resource->GetRequiresApproval()); $this->Set('autoAssign', $resource->GetAutoAssign()); if ($resource->HasImage()) { $this->Set('imageUrl', Configuration::Instance()->GetKey(ConfigKeys::IMAGE_UPLOAD_URL) . '/' . $resource->GetImage()); } }