/** * Declares an association between this object and a ChildResource object. * * @param ChildResource $v * @return $this|\App\Propel\SocialLike The current object (for fluent API support) * @throws PropelException */ public function setResource(ChildResource $v = null) { if ($v === null) { $this->setSocialLikeFor(NULL); } else { $this->setSocialLikeFor($v->getResourceId()); } $this->aResource = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildResource object, it will not be re-added. if ($v !== null) { $v->addSocialLike($this); } return $this; }