id = $data['id']; } if (isset($data['project_id'])) { $instance->projectId = $data['project_id']; } if (isset($data['article_id'])) { $instance->articleId = $data['article_id']; } if (isset($data['price_cycle'])) { $instance->priceCycle = $data['price_cycle']; } if (isset($data['document_type'])) { $instance->documentType = $data['document_type']; } if (isset($data['subscription_group_id'])) { $instance->subscriptionGroupId = $data['subscription_group_id']; } if (isset($data['position'])) { $instance->position = $data['position']; } if (isset($data['first_date_type'])) { $instance->firstDateType = $data['first_date_type']; } if (isset($data['prevent_auto_dispatch'])) { $instance->preventAutoDispatch = $data['prevent_auto_dispatch']; } if (isset($data['auto_email_confirmation'])) { $instance->autoEmailConfirmation = $data['auto_email_confirmation']; } if (isset($data['business_letter_pattern_id'])) { $instance->businessLetterPatternId = $data['business_letter_pattern_id']; } if (isset($data['add_pdf'])) { $instance->addPdf = $data['add_pdf']; } return $instance; } /** * @return int */ public function getId(): int { return $this->id; } /** * @return int */ public function getProjectId(): int { return $this->projectId; } /** * @return int */ public function getArticleId(): int { return $this->articleId; } /** * @return string */ public function getPriceCycle(): string { return $this->priceCycle; } /** * @return string */ public function getDocumentType(): string { return $this->documentType; } /** * @return int */ public function getSubscriptionGroupId(): int { return $this->subscriptionGroupId; } /** * @return int */ public function getPosition(): int { return $this->position; } /** * @return string */ public function getFirstDateType(): string { return $this->firstDateType; } /** * @return bool */ public function getPreventAutoDispatch(): bool { return $this->preventAutoDispatch; } /** * @return bool */ public function getAutoEmailConfirmation(): bool { return $this->autoEmailConfirmation; } /** * @return int */ public function getBusinessLetterPatternId(): int { return $this->businessLetterPatternId; } /** * @return bool */ public function getAddPdf(): bool { return $this->addPdf; } /** * @return array */ public function toArray(): array { return [ 'id' => $this->id, 'project_id' => $this->projectId, 'article_id' => $this->articleId, 'price_cycle' => $this->priceCycle, 'document_type' => $this->documentType, 'subscription_group_id' => $this->subscriptionGroupId, 'position' => $this->position, 'first_date_type' => $this->firstDateType, 'prevent_auto_dispatch' => $this->preventAutoDispatch, 'auto_email_confirmation' => $this->autoEmailConfirmation, 'business_letter_pattern_id' => $this->businessLetterPatternId, 'add_pdf' => $this->addPdf, ]; } }