コード例 #1
0
 /**
  * {@inheritDoc}
  */
 public function setRecipe(\Main\CookBundle\Entity\Recipe $recipe = NULL)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setRecipe', [$recipe]);
     return parent::setRecipe($recipe);
 }
コード例 #2
0
ファイル: Recipe.php プロジェクト: angiegit/cooksite
 /**
  * Add ingredient
  *
  * @param \Main\CookBundle\Entity\Ingredient $ingredient
  *
  * @return Recipe
  */
 public function addIngredient(\Main\CookBundle\Entity\Ingredient $ingredient)
 {
     $this->ingredient[] = $ingredient;
     $ingredient->setRecipe($this);
     return $this;
 }