src/Alchemy/Component/Cerberus/Model/Base/Permission.php
public function countRolePermissions(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collRolePermissionsPartial && !$this->isNew();
        if (null === $this->collRolePermissions || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collRolePermissions) {
                return 0;
            }

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

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

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

        return count($this->collRolePermissions);
    }
public function countRolePermissions(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collRolePermissionsPartial && !$this->isNew();
        if (null === $this->collRolePermissions || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collRolePermissions) {
                return 0;
            }

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

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

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

        return count($this->collRolePermissions);
    }
public function countRolePermissions ( Criteria $ criteria = null , $ distinct = false , ConnectionInterface $ con = null ) { $ partial = $ this -> collRolePermissionsPartial && ! $ this -> isNew ( ) ; if ( null === $ this -> collRolePermissions || null !== $ criteria || $ partial ) { if ( $ this -> isNew ( ) && null === $ this -> collRolePermissions ) { return 0 ; } if ( $ partial && ! $ criteria ) { return count ( $ this -> getRolePermissions ( ) ) ; } $ query = ChildRolePermissionQuery :: create ( null , $ criteria ) ; if ( $ distinct ) { $ query -> distinct ( ) ; } return $ query -> filterByPermission ( $ this ) -> count ( $ con ) ; } return count ( $ this -> collRolePermissions ) ; }
Returns the number of related RolePermission objects.

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