Exemple #1
0
 /**
  * Filter the query by a related \keeko\core\model\Module object
  *
  * @param \keeko\core\model\Module|ObjectCollection $module The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildActionQuery The current query, for fluid interface
  */
 public function filterByModule($module, $comparison = null)
 {
     if ($module instanceof \keeko\core\model\Module) {
         return $this->addUsingAlias(ActionTableMap::COL_MODULE_ID, $module->getId(), $comparison);
     } elseif ($module instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ActionTableMap::COL_MODULE_ID, $module->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByModule() only accepts arguments of type \\keeko\\core\\model\\Module or Collection');
     }
 }