src/V4/Model/QuoteSpecificField/QuoteSpecificField.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\V4\Model\QuoteSpecificField;
  3. use App\Model\Traits\ImportableObjectTrait;
  4. use App\V4\Model\Quote\Quote;
  5. use App\V4\Model\SpecificField\SpecificField;
  6. class QuoteSpecificField extends SpecificField
  7. {
  8.     use ImportableObjectTrait;
  9.     private $quote;
  10.     public function __construct()
  11.     {
  12.         $this->setType('QuoteSpecificField');
  13.     }
  14.     /**
  15.      * @return string|null
  16.      */
  17.     public function getQuote(): ?string
  18.     {
  19.         if ($this->quote instanceof Quote && !empty($this->quote->getId())) {
  20.             return '/api/quotes/'.$this->quote->getId();
  21.         }
  22.         return null;
  23.     }
  24.     /**
  25.      * @return Quote|null
  26.      */
  27.     public function getQuoteObject()
  28.     {
  29.         return $this->quote;
  30.     }
  31.     /**
  32.      * @param Quote|null $quote
  33.      *
  34.      * @return QuoteSpecificField
  35.      */
  36.     public function setQuote(?Quote $quote): QuoteSpecificField
  37.     {
  38.         $this->quote $quote;
  39.         return $this;
  40.     }
  41. }