src/Slashworks/BackendBundle/Model/om/BaseRole.php
public function countUserRoles(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
    {
        $partial = $this->collUserRolesPartial && !$this->isNew();
        if (null === $this->collUserRoles || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collUserRoles) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getUserRoles());
            }
            $query = UserRoleQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

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

        return count($this->collUserRoles);
    }
public function countUserRoles(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
    {
        $partial = $this->collUserRolesPartial && !$this->isNew();
        if (null === $this->collUserRoles || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collUserRoles) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getUserRoles());
            }
            $query = UserRoleQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

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

        return count($this->collUserRoles);
    }
public function countUserRoles ( Criteria $ criteria = null , $ distinct = false , PropelPDO $ con = null ) { $ partial = $ this -> collUserRolesPartial && ! $ this -> isNew ( ) ; if ( null === $ this -> collUserRoles || null !== $ criteria || $ partial ) { if ( $ this -> isNew ( ) && null === $ this -> collUserRoles ) { return 0 ; } if ( $ partial && ! $ criteria ) { return count ( $ this -> getUserRoles ( ) ) ; } $ query = UserRoleQuery :: create ( null , $ criteria ) ; if ( $ distinct ) { $ query -> distinct ( ) ; } return $ query -> filterByRole ( $ this ) -> count ( $ con ) ; } return count ( $ this -> collUserRoles ) ; }
Returns the number of related UserRole objects.

@param Criteria $criteria
@param boolean $distinct
@param PropelPDO $con
@return int             Count of related UserRole objects.
@throws PropelException
Returns the number of related UserRole objects .