Метод |
Описание |
|
__construct ( Doctrine\Common\Persistence\ObjectManager $em, Sulu\Bundle\TagBundle\Tag\TagManagerInterface $tagManager, Sulu\Bundle\MediaBundle\Media\Manager\MediaManagerInterface $mediaManager, AccountFactory $accountFactory, AccountRepository $accountRepository, ContactRepository $contactRepository, Sulu\Bundle\MediaBundle\Entity\MediaRepositoryInterface $mediaRepository ) |
|
|
addAddress ( Account $account, Address $address, boolean $isMain = false ) : AccountAddress |
Adds an address to the entity. |
|
deleteAllRelations ( $entity ) |
|
|
deleteBankAccounts ( $entity ) |
Deletes (not just removes) all bank-accounts which are assigned to a contact. |
|
findAll ( string $locale, null $filter = null ) : array | null |
Returns all accounts. |
|
findByFilters ( $filters, $page, $pageSize, $limit, $locale, $options = [] ) |
|
|
findContactsByAccountId ( integer $id, string $locale, boolean $onlyFetchMainAccounts = false ) : array | null |
Returns contacts by account id. |
|
getAccount ( Sulu\Bundle\ContactBundle\Entity\Account $account, string $locale ) : null | Account |
Returns an api entity for an doctrine entity. |
|
getAddressRelations ( $entity ) : mixed |
Returns a collection of relations to get addresses. |
|
getById ( integer $id, string $locale ) : mixed |
Gets account by id. |
|
getByIdAndInclude ( integer $id, string $locale, array $includes ) : Account |
Gets account by id - can include relations. |
|
getByIds ( array $ids, string $locale ) : array |
Returns account entities by ids. |
|
removeAddressRelation ( Sulu\Bundle\ContactBundle\Entity\AccountInterface $account, AccountAddress $accountAddress ) : mixed | void |
Removes the address relation from a contact and also deletes the address
if it has no more relations. |
|
setLogo ( Sulu\Bundle\ContactBundle\Entity\Account $account, integer $mediaId ) |
Takes an account-entity and the id of a media and adds the media as the logo of the account. |
|
setMedias ( Sulu\Bundle\ContactBundle\Entity\Account $account, $medias ) |
Sets the medias of the given account to the given medias. |
|