src/Model/ViewOrderInfo/ViewOrderInfo.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Model\ViewOrderInfo;
  3. use App\Form\CustomerConstraints\IsExtendedCustomerConstraintBuilder;
  4. use App\Model\Field\Field;
  5. use App\Model\FieldType\FieldType;
  6. use App\Model\Traits\ImportableObjectTrait;
  7. use App\Model\ViewOrder\ViewOrder;
  8. use Doctrine\Common\Collections\ArrayCollection;
  9. use Doctrine\Common\Collections\Collection;
  10. use Symfony\Component\Serializer\Annotation\Groups;
  11. use Symfony\Component\Serializer\Annotation\MaxDepth;
  12. class ViewOrderInfo
  13. {
  14.     const FIELD_KEY_VIEW_BY_FIELD_KEY = [
  15.         'updateBy' => 'updatedByRealName',
  16.         'tva' => 'tva.value',
  17.         'taskType' => 'taskType.name',
  18.         'structureType' => 'structureType.value',
  19.         'status' => 'status.name',
  20.         'service' => 'service.value',
  21.         'prospectType' => 'prospectType.value',
  22.         'type' => 'prospectType.value',
  23.         'prospectId' => 'prospectFullName',
  24.         'origin' => 'origin.value',
  25.         'managedBy' => 'managedByRealName',
  26.         'legalForm' => 'legalForm.value',
  27.         'createdBy' => 'createdByRealName',
  28.         'contacts' => 'contactsFormatted',
  29.         'contactId' => 'contactIdRealName',
  30.         'contact_civility' => 'contact.civility.value',
  31.         'company_workforce' => 'company.workforce.value',
  32.         'company_structureType' => 'company.structureType.value',
  33.         'company_naf' => 'company.naf.label',
  34.         'company_legalForm' => 'company.legalForm.value',
  35.         'civility' => 'civility.value',
  36.     ];
  37.     const VALUE_TYPE_RICH_TEXT 'html';
  38.     use ImportableObjectTrait;
  39.     /**
  40.      * @var string|null
  41.      * @Groups({"list_view_order", "show_view_order", "new_view_order"})
  42.      */
  43.     private $id;
  44.     /**
  45.      * @var string|null
  46.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  47.      */
  48.     private $viewOrderType;
  49.     /**
  50.      * @var bool|null
  51.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  52.      */
  53.     private $groupe false;
  54.     /**
  55.      * @var string|null
  56.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  57.      */
  58.     private $type;
  59.     /**
  60.      * @var string|null
  61.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  62.      */
  63.     private $displayWidth;
  64.     /**
  65.      * @var string|null
  66.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  67.      */
  68.     private $displayLabel;
  69.     /**
  70.      * @var string|null
  71.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  72.      */
  73.     private $ordre;
  74.     /**
  75.      * @var bool|null
  76.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  77.      */
  78.     private $isRequired false;
  79.     /**
  80.      * @var bool|null
  81.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  82.      */
  83.     private $isUnique false;
  84.     /**
  85.      * @var bool|null
  86.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  87.      */
  88.     private $isReadOnly false;
  89.     /**
  90.      * @var bool|null
  91.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  92.      */
  93.     private $isEmail false;
  94.     /**
  95.      * @var bool|null
  96.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  97.      */
  98.     private $isHidden false;
  99.     /**
  100.      * @var bool|null
  101.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  102.      */
  103.     private $hasPersonnalData false;
  104.     /**
  105.      * @var string|null
  106.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  107.      */
  108.     private $fieldKey;
  109.     /**
  110.      * @var Field|null
  111.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  112.      */
  113.     private $specificField;
  114.     /**
  115.      * @var string|null
  116.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  117.      */
  118.     private $fieldKeyView;
  119.     /**
  120.      * @var string|null
  121.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  122.      */
  123.     private $valueType;
  124.     /**
  125.      * @var ViewOrder|null
  126.      * @MaxDepth(1)
  127.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:update"})
  128.      */
  129.     private $viewOrder;
  130.     /**
  131.      * @var ViewOrderInfo|null
  132.      * @MaxDepth(1)
  133.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  134.      */
  135.     private $parent;
  136.     /**
  137.      * @var bool|null
  138.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  139.      */
  140.     private $isSpecificField false;
  141.     /**
  142.      * @var ViewOrderInfo[]|Collection|null
  143.      * @MaxDepth(1)
  144.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  145.      */
  146.     private $viewOrderInfos;
  147.     /**
  148.      * @var bool
  149.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  150.      */
  151.     private $isExtended false;
  152.     /**
  153.      * @var string|null
  154.      * @Groups({"list_view_order", "show_view_order", "new_view_order"})
  155.      */
  156.     private $conditionField;
  157.     /**
  158.      * @var string|null
  159.      * @Groups({"list_view_order", "show_view_order", "new_view_order"})
  160.      */
  161.     private $conditionValue;
  162.     /**
  163.      * @var bool
  164.      * @Groups({"list_view_order", "show_view_order", "new_view_order", "ViewOrder:create", "ViewOrder:update"})
  165.      */
  166.     private $isParentField false;
  167.     /**
  168.      * ViewOrderInfo constructor.
  169.      */
  170.     public function __construct()
  171.     {
  172.         $this->viewOrderInfos = new ArrayCollection();
  173.     }
  174.     /**
  175.      * @return array
  176.      */
  177.     public function format(): array
  178.     {
  179.         $commonFormat = [
  180.             'id' => $this->getId(),
  181.             'label' => $this->getDisplayLabel(),
  182.             'width' => $this->getDisplayWidth(),
  183.             'order' => $this->getOrdre(),
  184.             'key' => $this->getFieldKey(),
  185.             'hasPersonnalData' => $this->getHasPersonnalData(),
  186.             'isRequired' => $this->getIsRequired(),
  187.             'isReadOnly' => $this->isReadOnly(),
  188.             IsExtendedCustomerConstraintBuilder::IS_EXTENDED => $this->isExtended(),
  189.             'isEmail' => $this->isEmail(),
  190.             'isSpecificField' => $this->getIsSpecificField(),
  191.             'specificFieldType' => $this->getSpecificField() instanceof Field
  192.             && $this->getSpecificField()->getFieldType() instanceof FieldType ?
  193.                 $this->getSpecificField()->getFieldType()->getType() : null,
  194.             'isUnique' => $this->getIsUnique(),
  195.             'isHidden' => $this->getIsHidden(),
  196.             'type' => $this->getType(),
  197.             'viewKey' => $this->getFieldKeyView(),
  198.             'valueType' => $this->getValueType(),
  199.             'isGroup' => $this->getGroupe(),
  200.             'fields' => $this->getViewOrderInfos()->map(function (ViewOrderInfo $viewOrderInfo) {
  201.                 return $viewOrderInfo->format();
  202.             })->toArray(),
  203.             'conditionField' => $this->getConditionField(),
  204.             'conditionValue' => $this->getConditionValue(),
  205.             'isParentField' => $this->isParentField(),
  206.         ];
  207.         if (empty($commonFormat['viewKey'])) {
  208.             unset($commonFormat['viewKey']);
  209.         }
  210.         if (empty($commonFormat['key'])) {
  211.             unset($commonFormat['key']);
  212.         }
  213.         if (empty($commonFormat['type'])) {
  214.             unset($commonFormat['type']);
  215.         }
  216.         if (empty($commonFormat['valueType'])) {
  217.             unset($commonFormat['valueType']);
  218.         }
  219.         if (!$commonFormat['isGroup']) {
  220.             unset($commonFormat['fields']);
  221.         }
  222.         return $commonFormat;
  223.     }
  224.     /**
  225.      * @param array  $data
  226.      * @param string $type
  227.      *
  228.      * @return ViewOrderInfo
  229.      */
  230.     public function buildFromArray(array $datastring $type): ViewOrderInfo
  231.     {
  232.         $this
  233.             ->setId(empty($data['isNew']) ? $data['id'] ?? null null)
  234.             ->setDisplayLabel($data['label'] ?? null)
  235.             ->setDisplayWidth($data['width'])
  236.             ->setOrdre($data['order'])
  237.             ->setIsRequired(boolval($data['isRequired'] ?? false))
  238.             ->setIsReadOnly(boolval($data['isReadOnly'] ?? false))
  239.             ->setIsExtended(boolval($data[IsExtendedCustomerConstraintBuilder::IS_EXTENDED] ?? false))
  240.             ->setIsEmail(boolval($data['isEmail'] ?? false))
  241.             ->setIsSpecificField(boolval($data['isSpecificField'] ?? false))
  242.             ->setHasPersonnalData(boolval($data['hasPersonnalData'] ?? false))
  243.             ->setIsUnique(boolval($data['isUnique'] ?? false))
  244.             ->setIsHidden(boolval($data['isHidden'] ?? false))
  245.             ->setFieldKey($data['key'] ?? null)
  246.             ->setType($data['type'] ?? null)
  247.             ->setFieldKeyView($data['viewKey'] ?? null)
  248.             ->setValueType($data['valueType'] ?? null)
  249.             ->setViewOrderType($type)
  250.             ->setConditionField($data['conditionField'] ?? null)
  251.             ->setConditionValue($data['conditionValue'] ?? null)
  252.             ->setIsParentField($data['isParentField'] ?? false)
  253.             ->setGroupe($data['isGroup'] ?? $this->getGroupe())
  254.         ;
  255.         if (key_exists('fields'$data)) {
  256.             foreach ($data['fields'] as $field) {
  257.                 $this->addViewOrderInfo((new ViewOrderInfo())->buildFromArray($field$type));
  258.             }
  259.         }
  260.         return $this;
  261.     }
  262.     /**
  263.      * @return string
  264.      */
  265.     public function getId()
  266.     {
  267.         return $this->id;
  268.     }
  269.     /**
  270.      * @param string $id
  271.      *
  272.      * @return ViewOrderInfo
  273.      */
  274.     public function setId($id)
  275.     {
  276.         $this->id $id;
  277.         return $this;
  278.     }
  279.     /**
  280.      * @return string|null
  281.      */
  282.     public function getViewOrderType(): ?string
  283.     {
  284.         return $this->viewOrderType;
  285.     }
  286.     /**
  287.      * @param string|null $viewOrderType
  288.      *
  289.      * @return ViewOrderInfo
  290.      */
  291.     public function setViewOrderType(?string $viewOrderType): ViewOrderInfo
  292.     {
  293.         $this->viewOrderType $viewOrderType;
  294.         return $this;
  295.     }
  296.     /**
  297.      * @return bool|null
  298.      */
  299.     public function getGroupe(): ?bool
  300.     {
  301.         return $this->groupe;
  302.     }
  303.     /**
  304.      * @param bool|null $group
  305.      *
  306.      * @return ViewOrderInfo
  307.      */
  308.     public function setGroupe(?bool $group): ViewOrderInfo
  309.     {
  310.         $this->groupe $group;
  311.         return $this;
  312.     }
  313.     /**
  314.      * @return string|null
  315.      */
  316.     public function getDisplayWidth(): ?string
  317.     {
  318.         return $this->displayWidth;
  319.     }
  320.     /**
  321.      * @param string|null $displayWidth
  322.      *
  323.      * @return ViewOrderInfo
  324.      */
  325.     public function setDisplayWidth(?string $displayWidth): ViewOrderInfo
  326.     {
  327.         $this->displayWidth $displayWidth;
  328.         return $this;
  329.     }
  330.     /**
  331.      * @return string|null
  332.      */
  333.     public function getDisplayLabel(): ?string
  334.     {
  335.         return $this->displayLabel;
  336.     }
  337.     /**
  338.      * @param string|null $displayLabel
  339.      *
  340.      * @return ViewOrderInfo
  341.      */
  342.     public function setDisplayLabel(?string $displayLabel): ViewOrderInfo
  343.     {
  344.         $this->displayLabel $displayLabel;
  345.         return $this;
  346.     }
  347.     /**
  348.      * @return string|null
  349.      */
  350.     public function getFieldKey(): ?string
  351.     {
  352.         return $this->fieldKey;
  353.     }
  354.     /**
  355.      * @param string|null $fieldKey
  356.      *
  357.      * @return ViewOrderInfo
  358.      */
  359.     public function setFieldKey(?string $fieldKey): ViewOrderInfo
  360.     {
  361.         $this->fieldKey $fieldKey;
  362.         return $this;
  363.     }
  364.     /**
  365.      * @return ViewOrder|null
  366.      */
  367.     public function getViewOrder(): ?ViewOrder
  368.     {
  369.         return $this->viewOrder;
  370.     }
  371.     /**
  372.      * @param ViewOrder|null $viewOrder
  373.      *
  374.      * @return ViewOrderInfo
  375.      */
  376.     public function setViewOrder($viewOrder): ViewOrderInfo
  377.     {
  378.         $this->viewOrder $viewOrder;
  379.         return $this;
  380.     }
  381.     /**
  382.      * @return ViewOrderInfo|null
  383.      */
  384.     public function getParent(): ?ViewOrderInfo
  385.     {
  386.         return $this->parent;
  387.     }
  388.     /**
  389.      * @param ViewOrderInfo|null $parent
  390.      *
  391.      * @return ViewOrderInfo
  392.      */
  393.     public function setParent(?ViewOrderInfo $parent): ViewOrderInfo
  394.     {
  395.         $this->parent $parent;
  396.         return $this;
  397.     }
  398.     /**
  399.      * @return ViewOrderInfo[]|Collection|null
  400.      */
  401.     public function getViewOrderInfos(): ?Collection
  402.     {
  403.         return $this->viewOrderInfos;
  404.     }
  405.     /**
  406.      * Add a children viewOrderInfo object.
  407.      *
  408.      * @param ViewOrderInfo $children
  409.      */
  410.     public function addViewOrderInfo(ViewOrderInfo $children)
  411.     {
  412.         if (!$this->getViewOrderInfos()->contains($children)) {
  413.             $children->setParent($this);
  414.             $this->getViewOrderInfos()->add($children);
  415.         }
  416.     }
  417.     /**
  418.      * Remove a children viewOrderInfo object.
  419.      *
  420.      * @param ViewOrderInfo $children
  421.      */
  422.     public function removeViewOrderInfo(ViewOrderInfo $children)
  423.     {
  424.         if ($this->getViewOrderInfos()->contains($children)) {
  425.             $children->setParent(null);
  426.             $this->getViewOrderInfos()->removeElement($children);
  427.         }
  428.     }
  429.     /**
  430.      * @param $viewOrderInfos
  431.      *
  432.      * @return $this
  433.      */
  434.     public function setViewOrderInfos($viewOrderInfos): self
  435.     {
  436.         $this->viewOrderInfos $viewOrderInfos;
  437.         return $this;
  438.     }
  439.     /**
  440.      * @return string|null
  441.      */
  442.     public function getOrdre(): ?string
  443.     {
  444.         return $this->ordre;
  445.     }
  446.     /**
  447.      * @param string|null $ordre
  448.      *
  449.      * @return ViewOrderInfo
  450.      */
  451.     public function setOrdre(?string $ordre): ViewOrderInfo
  452.     {
  453.         $this->ordre $ordre;
  454.         return $this;
  455.     }
  456.     /**
  457.      * @return string|null
  458.      */
  459.     public function getType(): ?string
  460.     {
  461.         return $this->type;
  462.     }
  463.     /**
  464.      * @param string|null $type
  465.      *
  466.      * @return ViewOrderInfo
  467.      */
  468.     public function setType(?string $type): ViewOrderInfo
  469.     {
  470.         $this->type $type;
  471.         return $this;
  472.     }
  473.     /**
  474.      * @return string|null
  475.      */
  476.     public function getFieldKeyView(): ?string
  477.     {
  478.         if (null === $this->fieldKeyView
  479.             && null !== $this->getFieldKey()
  480.             && isset(self::FIELD_KEY_VIEW_BY_FIELD_KEY[$this->getFieldKey()])
  481.         ) {
  482.             return self::FIELD_KEY_VIEW_BY_FIELD_KEY[$this->getFieldKey()];
  483.         }
  484.         return $this->fieldKeyView;
  485.     }
  486.     /**
  487.      * @param string|null $fieldKeyView
  488.      *
  489.      * @return ViewOrderInfo
  490.      */
  491.     public function setFieldKeyView(?string $fieldKeyView): ViewOrderInfo
  492.     {
  493.         $this->fieldKeyView $fieldKeyView;
  494.         return $this;
  495.     }
  496.     /**
  497.      * @return string|null
  498.      */
  499.     public function getValueType(): ?string
  500.     {
  501.         return $this->valueType;
  502.     }
  503.     /**
  504.      * @param string|null $valueType
  505.      *
  506.      * @return ViewOrderInfo
  507.      */
  508.     public function setValueType(?string $valueType): ViewOrderInfo
  509.     {
  510.         $this->valueType $valueType;
  511.         return $this;
  512.     }
  513.     /**
  514.      * @return bool|null
  515.      */
  516.     public function getIsRequired(): ?bool
  517.     {
  518.         return $this->isRequired;
  519.     }
  520.     /**
  521.      * @param bool|null $isRequired
  522.      *
  523.      * @return ViewOrderInfo
  524.      */
  525.     public function setIsRequired(?bool $isRequired): ViewOrderInfo
  526.     {
  527.         $this->isRequired $isRequired;
  528.         return $this;
  529.     }
  530.     /**
  531.      * @return bool|null
  532.      */
  533.     public function getIsUnique(): ?bool
  534.     {
  535.         return $this->isUnique;
  536.     }
  537.     /**
  538.      * @param bool|null $isUnique
  539.      *
  540.      * @return ViewOrderInfo
  541.      */
  542.     public function setIsUnique(?bool $isUnique): ViewOrderInfo
  543.     {
  544.         $this->isUnique $isUnique;
  545.         return $this;
  546.     }
  547.     /**
  548.      * @return string|null
  549.      */
  550.     public function isSpecificField(): ?bool
  551.     {
  552.         return $this->isSpecificField || $this->getSpecificField() instanceof Field;
  553.     }
  554.     /**
  555.      * @return string|null
  556.      */
  557.     public function getIsSpecificField(): ?bool
  558.     {
  559.         return $this->isSpecificField;
  560.     }
  561.     /**
  562.      * @param bool|null $isSpecificField
  563.      *
  564.      * @return ViewOrderInfo
  565.      */
  566.     public function setIsSpecificField(?bool $isSpecificField): ViewOrderInfo
  567.     {
  568.         $this->isSpecificField $isSpecificField;
  569.         return $this;
  570.     }
  571.     /**
  572.      * @return Field|null
  573.      */
  574.     public function getSpecificField(): ?Field
  575.     {
  576.         return $this->specificField;
  577.     }
  578.     /**
  579.      * @param Field|null $specificField
  580.      *
  581.      * @return ViewOrderInfo
  582.      */
  583.     public function setSpecificField(?Field $specificField): ViewOrderInfo
  584.     {
  585.         $this->specificField $specificField;
  586.         return $this;
  587.     }
  588.     /**
  589.      * @return bool|null
  590.      */
  591.     public function getIsHidden(): ?bool
  592.     {
  593.         return $this->isHidden;
  594.     }
  595.     /**
  596.      * @param bool|null $isHidden
  597.      *
  598.      * @return ViewOrderInfo
  599.      */
  600.     public function setIsHidden(?bool $isHidden): ViewOrderInfo
  601.     {
  602.         $this->isHidden $isHidden;
  603.         return $this;
  604.     }
  605.     /**
  606.      * @return bool|null
  607.      */
  608.     public function getHasPersonnalData(): ?bool
  609.     {
  610.         return $this->hasPersonnalData;
  611.     }
  612.     /**
  613.      * @param bool|null $hasPersonnalData
  614.      *
  615.      * @return ViewOrderInfo
  616.      */
  617.     public function setHasPersonnalData(?bool $hasPersonnalData): ViewOrderInfo
  618.     {
  619.         $this->hasPersonnalData $hasPersonnalData;
  620.         return $this;
  621.     }
  622.     /**
  623.      * @return bool|null
  624.      */
  625.     public function isReadOnly(): ?bool
  626.     {
  627.         return $this->isReadOnly;
  628.     }
  629.     /**
  630.      * @param bool|null $isReadOnly
  631.      *
  632.      * @return ViewOrderInfo
  633.      */
  634.     public function setIsReadOnly(?bool $isReadOnly): ViewOrderInfo
  635.     {
  636.         $this->isReadOnly $isReadOnly;
  637.         return $this;
  638.     }
  639.     /**
  640.      * @return bool|null
  641.      */
  642.     public function isEmail(): ?bool
  643.     {
  644.         return $this->isEmail;
  645.     }
  646.     /**
  647.      * @param bool|null $isEmail
  648.      *
  649.      * @return ViewOrderInfo
  650.      */
  651.     public function setIsEmail(?bool $isEmail): self
  652.     {
  653.         $this->isEmail $isEmail;
  654.         return $this;
  655.     }
  656.     /**
  657.      * @return bool
  658.      */
  659.     public function isExtended(): bool
  660.     {
  661.         return $this->isExtended;
  662.     }
  663.     /**
  664.      * @param bool $isExtended
  665.      *
  666.      * @return ViewOrderInfo
  667.      */
  668.     public function setIsExtended(bool $isExtended): self
  669.     {
  670.         $this->isExtended $isExtended;
  671.         return $this;
  672.     }
  673.     /**
  674.      * @return string|null
  675.      */
  676.     public function getConditionField(): ?string
  677.     {
  678.         return $this->conditionField;
  679.     }
  680.     /**
  681.      * @param string|null $conditionField
  682.      *
  683.      * @return ViewOrderInfo
  684.      */
  685.     public function setConditionField(?string $conditionField): self
  686.     {
  687.         $this->conditionField $conditionField;
  688.         return $this;
  689.     }
  690.     /**
  691.      * @return string|null
  692.      */
  693.     public function getConditionValue(): ?string
  694.     {
  695.         return $this->conditionValue;
  696.     }
  697.     /**
  698.      * @param string|null $conditionValue
  699.      *
  700.      * @return ViewOrderInfo
  701.      */
  702.     public function setConditionValue(?string $conditionValue): self
  703.     {
  704.         $this->conditionValue $conditionValue;
  705.         return $this;
  706.     }
  707.     /**
  708.      * @return bool
  709.      */
  710.     public function isParentField(): bool
  711.     {
  712.         return $this->isParentField;
  713.     }
  714.     /**
  715.      * @param bool $isParentField
  716.      *
  717.      * @return ViewOrderInfo
  718.      */
  719.     public function setIsParentField(bool $isParentField): self
  720.     {
  721.         $this->isParentField $isParentField;
  722.         return $this;
  723.     }
  724. }