Exemplo n.º 1
0
 /**
  * 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->aUser) {
         $this->aUser->removePermissionGroupUser($this);
     }
     if (null !== $this->aPermissionGroup) {
         $this->aPermissionGroup->removePermissionGroupUser($this);
     }
     $this->user_id = null;
     $this->group_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\PermissionGroup object
  *
  * @param \Tekstove\ApiBundle\Model\Acl\PermissionGroup|ObjectCollection $permissionGroup 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 ChildPermissionGroupUserQuery The current query, for fluid interface
  */
 public function filterByPermissionGroup($permissionGroup, $comparison = null)
 {
     if ($permissionGroup instanceof \Tekstove\ApiBundle\Model\Acl\PermissionGroup) {
         return $this->addUsingAlias(PermissionGroupUserTableMap::COL_GROUP_ID, $permissionGroup->getId(), $comparison);
     } elseif ($permissionGroup instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(PermissionGroupUserTableMap::COL_GROUP_ID, $permissionGroup->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByPermissionGroup() only accepts arguments of type \\Tekstove\\ApiBundle\\Model\\Acl\\PermissionGroup or Collection');
     }
 }
 /**
  * Exclude object from result
  *
  * @param   ChildPermissionGroup $permissionGroup Object to remove from the list of results
  *
  * @return $this|ChildPermissionGroupQuery The current query, for fluid interface
  */
 public function prune($permissionGroup = null)
 {
     if ($permissionGroup) {
         $this->addUsingAlias(PermissionGroupTableMap::COL_ID, $permissionGroup->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }