/** * Declares an association between this object and a ChildPeriod object. * * @param ChildPeriod $v * @return $this|\App\Models\PeriodSchoolYear The current object (for fluent API support) * @throws PropelException */ public function setPeriod(ChildPeriod $v = null) { if ($v === null) { $this->setPeriodId(NULL); } else { $this->setPeriodId($v->getId()); } $this->aPeriod = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildPeriod object, it will not be re-added. if ($v !== null) { $v->addPeriodSchoolYear($this); } return $this; }