<?php

namespace App\Form\Model;

use App\Form\Model\IndiceModel;
use App\Entity\Goal;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;

class IndiceCollectionModel
{
    public $goal;
    
    public $indiceModels;

    public function __construct()//?Goal $goal
    {
        $this->indiceModels = new ArrayCollection();
        //$this->goal = $goal;
    }


    public function getGoal(): ?Goal
    {
        return $this->goal;
    }

    public function setGoal(?Goal $goal): self
    {
        $this->goal = $goal;

        return $this;
    }

    /**
     * @return Collection|indiceModel[]
     */
    public function getIndiceModels(): Collection
    {
        return $this->indiceModels;
    }

    public function addIndiceModel(IndiceModel $indiceModel): self
    {
       // if (!$this->indiceModels->contains($indiceModels)) {
            $this->indiceModels[] = $indiceModel;
            //$indiceModel->setIndiceCollection($this);
      //  }

        return $this;
    }
}