Ejemplo n.º 1
0
 /**
  * Internal mechanism to set the FeaturedPicture id
  * 
  * @param Skill $model
  * @param mixed $relatedId
  */
 protected function doSetFeaturedPictureId(Skill $model, $relatedId)
 {
     if ($model->getPictureId() !== $relatedId) {
         $model->setPictureId($relatedId);
         return true;
     }
     return false;
 }
Ejemplo n.º 2
0
 /**
  * Filter the query by a related \gossi\trixionary\model\Skill object
  *
  * @param \gossi\trixionary\model\Skill|ObjectCollection $skill the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildPictureQuery The current query, for fluid interface
  */
 public function filterByFeaturedSkill($skill, $comparison = null)
 {
     if ($skill instanceof \gossi\trixionary\model\Skill) {
         return $this->addUsingAlias(PictureTableMap::COL_ID, $skill->getPictureId(), $comparison);
     } elseif ($skill instanceof ObjectCollection) {
         return $this->useFeaturedSkillQuery()->filterByPrimaryKeys($skill->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByFeaturedSkill() only accepts arguments of type \\gossi\\trixionary\\model\\Skill or Collection');
     }
 }