/** * Clears the current object, sets all attributes to their default values and removes * outgoing references as well as back-references (from other objects to this one. Results probably in a database * change of those foreign objects when you call `save` there). */ public function clear() { if (null !== $this->aPermissionGroup) { $this->aPermissionGroup->removePermissionGroupPermission($this); } if (null !== $this->aPermission) { $this->aPermission->removePermissionGroupPermission($this); } $this->group_id = null; $this->permission_id = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }
/** * 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'); } }
/** * 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; }