PHP Class Sulu\Bundle\ContactBundle\Entity\AccountRepository

Inheritance: extends Gedmo\Tree\Entity\Repository\NestedTreeRepository, implements Sulu\Component\SmartContent\Orm\DataProviderRepositoryInterface, use trait Sulu\Component\SmartContent\Orm\DataProviderRepositoryTrait
Exibir arquivo Open project: sulu/sulu Class Usage Examples

Public Methods

Method Description
countDistinctAccountChildrenAndContacts ( $id ) : mixed distinct count account's children and contacts.
findAccountById ( $id, $contacts = false ) : mixed Get account by id.
findAccountByIdAndDelete ( $id ) : mixed Get account by id to delete.
findAccountOnly ( $id )
findAllSelect ( array $fields = [] ) : array finds all accounts but only selects given fields.
findByFilter ( array $filter )
findByIds ( $ids ) : mixed Get account by id.
findChildrenAndContacts ( $id ) : mixed distinct count account's children and contacts.
findOneByContactId ( $contactId ) : array Searches for accounts with a specific contact.

Protected Methods

Method Description
appendJoins ( Doctrine\ORM\QueryBuilder $queryBuilder, $alias, $locale ) Append joins to query builder for "findByFilters" function.

Method Details

appendJoins() protected method

Append joins to query builder for "findByFilters" function.
protected appendJoins ( Doctrine\ORM\QueryBuilder $queryBuilder, $alias, $locale )
$queryBuilder Doctrine\ORM\QueryBuilder

countDistinctAccountChildrenAndContacts() public method

distinct count account's children and contacts.

findAccountById() public method

Get account by id.
public findAccountById ( $id, $contacts = false ) : mixed
$id
$contacts
return mixed

findAccountByIdAndDelete() public method

Get account by id to delete.
public findAccountByIdAndDelete ( $id ) : mixed
$id
return mixed

findAccountOnly() public method

public findAccountOnly ( $id )

findAllSelect() public method

finds all accounts but only selects given fields.
public findAllSelect ( array $fields = [] ) : array
$fields array
return array

findByFilter() public method

public findByFilter ( array $filter )
$filter array

findByIds() public method

Get account by id.
public findByIds ( $ids ) : mixed
$ids
return mixed

findChildrenAndContacts() public method

distinct count account's children and contacts.
public findChildrenAndContacts ( $id ) : mixed
$id
return mixed

findOneByContactId() public method

Searches for accounts with a specific contact.
public findOneByContactId ( $contactId ) : array
$contactId
return array