/** * Exclude object from result * * @param ChildPermission $permission Object to remove from the list of results * * @return $this|ChildPermissionQuery The current query, for fluid interface */ public function prune($permission = null) { if ($permission) { $this->addUsingAlias(PermissionTableMap::COL_ID, $permission->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Filter the query by a related \Tekstove\ApiBundle\Model\Acl\Permission object * * @param \Tekstove\ApiBundle\Model\Acl\Permission|ObjectCollection $permission 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 ChildPermissionGroupPermissionQuery The current query, for fluid interface */ public function filterByPermission($permission, $comparison = null) { if ($permission instanceof \Tekstove\ApiBundle\Model\Acl\Permission) { return $this->addUsingAlias(PermissionGroupPermissionTableMap::COL_PERMISSION_ID, $permission->getId(), $comparison); } elseif ($permission instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(PermissionGroupPermissionTableMap::COL_PERMISSION_ID, $permission->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByPermission() only accepts arguments of type \\Tekstove\\ApiBundle\\Model\\Acl\\Permission or Collection'); } }
/** * Declares an association between this object and a ChildPermission object. * * @param ChildPermission $v * @return $this|\Tekstove\ApiBundle\Model\Acl\PermissionGroupPermission The current object (for fluent API support) * @throws PropelException */ public function setPermission(ChildPermission $v = null) { if ($v === null) { $this->setPermissionId(NULL); } else { $this->setPermissionId($v->getId()); } $this->aPermission = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildPermission object, it will not be re-added. if ($v !== null) { $v->addPermissionGroupPermission($this); } return $this; }