/** * 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->aRole) { $this->aRole->removeRoleI18n($this); } $this->role_id = null; $this->locale = null; $this->role_name = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->applyDefaultValues(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }
/** * 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->aFile) { $this->aFile->removeUser($this); } if (null !== $this->aRole) { $this->aRole->removeUser($this); } if (null !== $this->aResource) { $this->aResource->removeUser($this); } $this->user_id = null; $this->resource_id = null; $this->user_name = null; $this->user_surname = null; $this->user_login = null; $this->user_pass = null; $this->user_pass_is_temp = null; $this->remember_token = null; $this->user_email = null; $this->user_phone = null; $this->user_address = null; $this->role_id = null; $this->user_is_validated = null; $this->user_is_active = null; $this->user_pic = null; $this->created_at = null; $this->updated_at = null; $this->alreadyInSave = false; $this->clearAllReferences(); $this->applyDefaultValues(); $this->resetModified(); $this->setNew(true); $this->setDeleted(false); }
/** * Filter the query by a related \App\Propel\Role object * * @param \App\Propel\Role|ObjectCollection $role 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 ChildRoleI18nQuery The current query, for fluid interface */ public function filterByRole($role, $comparison = null) { if ($role instanceof \App\Propel\Role) { return $this->addUsingAlias(RoleI18nTableMap::COL_ROLE_ID, $role->getRoleId(), $comparison); } elseif ($role instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(RoleI18nTableMap::COL_ROLE_ID, $role->toKeyValue('PrimaryKey', 'RoleId'), $comparison); } else { throw new PropelException('filterByRole() only accepts arguments of type \\App\\Propel\\Role or Collection'); } }
/** * Exclude object from result * * @param ChildRole $role Object to remove from the list of results * * @return $this|ChildRoleQuery The current query, for fluid interface */ public function prune($role = null) { if ($role) { $this->addUsingAlias(RoleTableMap::COL_ROLE_ID, $role->getRoleId(), Criteria::NOT_EQUAL); } return $this; }