Exclude object from result

@param   ChildPersonI18n $personI18n Object to remove from the list of results

@return ChildPersonI18nQuery The current query, for fluid interface
519845
public function prune($personI18n = null)
    {
        if ($personI18n) {
            $this->addCond('pruneCond0', $this->getAliasedColName(PersonI18nTableMap::ID), $personI18n->getId(), Criteria::NOT_EQUAL);
            $this->addCond('pruneCond1', $this->getAliasedColName(PersonI18nTableMap::LOCALE), $personI18n->getLocale(), Criteria::NOT_EQUAL);
            $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR);
        }

        return $this;
    }
114006
public function countDealerContactInfoI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collDealerContactInfoI18nsPartial && !$this->isNew();
        if (null === $this->collDealerContactInfoI18ns || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collDealerContactInfoI18ns) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getDealerContactInfoI18ns());
            }

            $query = ChildDealerContactInfoI18nQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByDealerContactInfo($this)
                ->count($con);
        }

        return count($this->collDealerContactInfoI18ns);
    }
723607
public function setPerson(\Innova\LexiconBundle\Entity\Person $person = null)
    {
        $this->person = $person;

        return $this;
    }
145124
public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
    {
        if (!isset($this->currentTranslations[$locale])) {
            if (null !== $this->collSmartyFilterI18ns) {
                foreach ($this->collSmartyFilterI18ns as $translation) {
                    if ($translation->getLocale() == $locale) {
                        $this->currentTranslations[$locale] = $translation;

                        return $translation;
                    }
                }
            }
            if ($this->isNew()) {
                $translation = new ChildSmartyFilterI18n();
                $translation->setLocale($locale);
            } else {
                $translation = ChildSmartyFilterI18nQuery::create()
                    ->filterByPrimaryKey(array($this->getPrimaryKey(), $locale))
                    ->findOneOrCreate($con);
                $this->currentTranslations[$locale] = $translation;
            }
            $this->addSmartyFilterI18n($translation);
        }

        return $this->currentTranslations[$locale];
    }
1120437
static function removeUser( $userID )
    {
        $user = eZUser::fetch( $userID );
        if ( !$user )
        {
            eZDebug::writeError( "unable to find user with ID $userID", __METHOD__ );
            return false;
        }

        eZUser::removeSessionData( $userID );

        eZSubtreeNotificationRule::removeByUserID( $userID );
        eZCollaborationNotificationRule::removeByUserID( $userID );
        eZUserSetting::removeByUserID( $userID );
        eZUserAccountKey::removeByUserID( $userID );
        eZForgotPassword::removeByUserID( $userID );
        eZWishList::removeByUserID( $userID );
        eZGeneralDigestUserSettings::removeByUserId( $userID );

        eZPersistentObject::removeObject( eZUser::definition(),
                                          array( 'contentobject_id' => $userID ) );
        return true;
    }
390747
protected function applyUserLocale(UserInterface $user)
    {
        // Set the current language according to locale preference
        $locale = $user->getLocale();

        if (null === $lang = LangQuery::create()->findOneByLocale($locale)) {
            $lang = Lang::getDefaultLanguage();
        }

        $this->getSession()->setLang($lang);
    }
440086
function removeTranslation( $languageLocale )
    {
        $this->NameList->removeName( $languageLocale );
        $this->DescriptionList->removeName( $languageLocale );
        $this->DataTextI18nList->removeName( $languageLocale );
    }
365584
public function getPackageSelectQuery(PackageVersionEntity $packageVersion, LocaleEntity $locale, $excludeUntranslatedStrings = false)
    {
        $cn = $this->app->make(EntityManager::class)->getConnection();
        $queryPackageVersionID = (int) $packageVersion->getID();

        return $cn->executeQuery(
            $this->getBaseSelectString($locale, true, $excludeUntranslatedStrings) .
            "
                where
                    CommunityTranslationTranslatablePlaces.packageVersion = $queryPackageVersionID
                order by
                    CommunityTranslationTranslatablePlaces.sort
            "
        );
    }
31504
public function countDealerContactI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collDealerContactI18nsPartial && !$this->isNew();
        if (null === $this->collDealerContactI18ns || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collDealerContactI18ns) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getDealerContactI18ns());
            }

            $query = ChildDealerContactI18nQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByDealerContact($this)
                ->count($con);
        }

        return count($this->collDealerContactI18ns);
    }
776577
public function getTranslation($locale = 'en_US', ConnectionInterface $con = null)
    {
        if (!isset($this->currentTranslations[$locale])) {
            if (null !== $this->collPersonImageI18ns) {
                foreach ($this->collPersonImageI18ns as $translation) {
                    if ($translation->getLocale() == $locale) {
                        $this->currentTranslations[$locale] = $translation;

                        return $translation;
                    }
                }
            }
            if ($this->isNew()) {
                $translation = new ChildPersonImageI18n();
                $translation->setLocale($locale);
            } else {
                $translation = ChildPersonImageI18nQuery::create()
                    ->filterByPrimaryKey(array($this->getPrimaryKey(), $locale))
                    ->findOneOrCreate($con);
                $this->currentTranslations[$locale] = $translation;
            }
            $this->addPersonImageI18n($translation);
        }

        return $this->currentTranslations[$locale];
    }
1330364
public function retrieveTypePrivatePerson($locale)
    {
        $customerType = new CustomerType();
        $customerType->setId(self::TYPE_PRIVATE_PERSON_ID);
        $customerType->setName(
            $this->retrieveTranslator($locale)->trans(
                'salescore.customer-type.private-person',
                [],
                self::TRANSLATION_DOMAIN
            )
        );

        return $customerType;
    }
949183
public function removeAdministrator($person)
    {
        $result = $this->administrators->extract($person);

        if (!$result) {
            $this->resetStats(array($this->_mixer, $person));
        }

        return $result;
    }
715651
public function setPersonType($PersonType)
    {
        switch ($PersonType) {
            case static::NATURAL_PERSON:
            case static::LEGAL_PERSONALITY:
                $this->PersonType = $PersonType;
            break;

            default:
                throw new \InvalidArgumentException(sprintf('Invalid person type: %s', $PersonType));
        }

        return $this;
    }
206648
public function getUsersWithEntityVersionLock(LockableEntityInterface $entity, User $userToExclude = null)
    {
        /** @var LockableEntity $lockable */
        $lockable = $this->getLockableEntity($entity);

        return  array_reduce(
            $this->getEntityVersionLocksByLockableEntity($lockable, $userToExclude),
            function ($return, EntityVersionLock $item) {
                $return[] = $item->getOwner();

                return $return;
            },
            []
        );
    }
344082
public function countSmartyFilterI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collSmartyFilterI18nsPartial && !$this->isNew();
        if (null === $this->collSmartyFilterI18ns || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collSmartyFilterI18ns) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getSmartyFilterI18ns());
            }

            $query = ChildSmartyFilterI18nQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterBySmartyFilter($this)
                ->count($con);
        }

        return count($this->collSmartyFilterI18ns);
    }
1171084
protected function getI18nsMethod()
    {
        $class_name = $this->CamelCase($this->getTable()->getName());
        $get_i18ns_method = '
    /**
     * Gets an array of '.$class_name.'I18n objects which contain a foreign key that references this object.
     *
     * If the $criteria is not null, it is used to always fetch the results from the database.
     * Otherwise the results are fetched from the database the first time, then cached.
     * Next time the same method is called without $criteria, the cached collection is returned.
     * If this FaqQuestionGroup is new, it will return
     * an empty collection or the current collection; the criteria is ignored on a new object.
     *
     * @param Criteria $criteria optional Criteria object to narrow the query
     * @param PropelPDO $con optional connection object
     * @return PropelObjectCollection|'.$class_name.'I18n[] List of '.$class_name.'I18n objects
     * @throws PropelException
     */
    public function get'.$class_name.'I18ns($criteria = null, PropelPDO $con = null)
    {
        $partial = $this->coll'.$class_name.'I18nsPartial && !$this->isNew();
        if (null === $this->coll'.$class_name.'I18ns || null !== $criteria  || $partial) {
            if ($this->isNew() && null === $this->coll'.$class_name.'I18ns) {
                // return empty collections
                $this->init'.$class_name.'I18ns();
            } else {
                $coll'.$class_name.'I18ns = '.$class_name.'I18nQuery::create(null, $criteria)
                    ->filterBy'.$class_name.'($this)
                    ->find($con);
                $coll'.$class_name.'I18ns = $this->sortI18ns($coll'.$class_name.'I18ns);
                if (null !== $criteria) {
                    if (false !== $this->coll'.$class_name.'I18nsPartial && count($coll'.$class_name.'I18ns)) {
                      $this->init'.$class_name.'I18ns(false);

                      foreach ($coll'.$class_name.'I18ns as $obj) {
                        if (false == $this->coll'.$class_name.'I18ns->contains($obj)) {
                          $this->coll'.$class_name.'I18ns->append($obj);
                        }
                      }

                      $this->coll'.$class_name.'I18nsPartial = true;
                    }

                    $coll'.$class_name.'I18ns->getInternalIterator()->rewind();

                    return $coll'.$class_name.'I18ns;
                }

                if ($partial && $this->coll'.$class_name.'I18ns) {
                    foreach ($this->coll'.$class_name.'I18ns as $obj) {
                        if ($obj->isNew()) {
                            $coll'.$class_name.'I18ns[] = $obj;
                        }
                    }
                }

                $this->coll'.$class_name.'I18ns = $coll'.$class_name.'I18ns;
                $this->coll'.$class_name.'I18nsPartial = false;
            }
        }

        return $this->coll'.$class_name.'I18ns;
    }
        ';
        return $get_i18ns_method;
    }
274993
public function removeAce(SecurityIdentityInterface $securityIdentity = null, $objectLanguage = null)
    {
        $aces = null;
        foreach ($this->entries as $index => $entry) {
            if ($entry->getSecurityIdentifier() === $securityIdentity->getIdentifier() && $entry->getSecurityType() === $securityIdentity->getType()) {
                unset($this->entries[$index]);
            }
        }

        return $this;
    }