PHP 클래스 Sulu\Bundle\ContactBundle\Contact\ContactManager

상속: extends AbstractContactManager
파일 보기 프로젝트 열기: sulu/sulu 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$mediaRepository Sulu\Bundle\MediaBundle\Entity\MediaRepositoryInterface

공개 메소드들

메소드 설명
__construct ( Doctrine\Common\Persistence\ObjectManager $em, Sulu\Bundle\TagBundle\Tag\TagManagerInterface $tagManager, Sulu\Bundle\MediaBundle\Media\Manager\MediaManagerInterface $mediaManager, AccountRepository $accountRepository, ContactTitleRepository $contactTitleRepository, ContactRepository $contactRepository, Sulu\Bundle\MediaBundle\Entity\MediaRepositoryInterface $mediaRepository )
addAddress ( Contact $contact, Address $address, boolean $isMain ) : ContactAddress adds an address to the entity.
delete ( ) : Closure Deletes the contact for the given id.
findByFilters ( $filters, $page, $pageSize, $limit, $locale, $options = [] )
findById ( integer $id ) : mixed | null Find a contact by it's id.
getAddressRelations ( $entity ) : mixed Returns a collection of relations to get addresses.
getById ( $id, $locale ) : mixed
getByIds ( $ids, $locale ) : mixed Returns contact entities by ids.
getContact ( $contact, $locale ) : null | Contact Returns an api entity for an doctrine entity.
getContactEntityName ( ) : string Get contact entity name.
removeAddressRelation ( Contact $contact, ContactAddress $contactAddress ) : mixed | void removes the address relation from a contact and also deletes the address if it has no more relations.
save ( array $data, integer | null $id = null, boolean $patch = false, boolean $flush = true ) : Contact Creates a new contact for the given data.
setMainAccount ( Contact $contact, $data )
setTitleOnContact ( $contact, $titleId )

보호된 메소드들

메소드 설명
getApiObject ( Contact $contact, string $locale ) : Contact Takes a contact entity and a locale and returns the api object.

비공개 메소드들

메소드 설명
getProperty ( array $data, string $key, string $default = null ) : string | null Return property for key or given default value.
setAvatar ( Contact $contact, array $avatar ) Sets a media with a given id as the avatar of a given contact.
setMedias ( Contact $contact, $medias ) Sets the medias of the given contact to the given medias.

메소드 상세

__construct() 공개 메소드

public __construct ( Doctrine\Common\Persistence\ObjectManager $em, Sulu\Bundle\TagBundle\Tag\TagManagerInterface $tagManager, Sulu\Bundle\MediaBundle\Media\Manager\MediaManagerInterface $mediaManager, AccountRepository $accountRepository, ContactTitleRepository $contactTitleRepository, ContactRepository $contactRepository, Sulu\Bundle\MediaBundle\Entity\MediaRepositoryInterface $mediaRepository )
$em Doctrine\Common\Persistence\ObjectManager
$tagManager Sulu\Bundle\TagBundle\Tag\TagManagerInterface
$mediaManager Sulu\Bundle\MediaBundle\Media\Manager\MediaManagerInterface
$accountRepository Sulu\Bundle\ContactBundle\Entity\AccountRepository
$contactTitleRepository ContactTitleRepository
$contactRepository Sulu\Bundle\ContactBundle\Entity\ContactRepository
$mediaRepository Sulu\Bundle\MediaBundle\Entity\MediaRepositoryInterface

addAddress() 공개 메소드

adds an address to the entity.
public addAddress ( Contact $contact, Address $address, boolean $isMain ) : ContactAddress
$contact Sulu\Bundle\ContactBundle\Entity\Contact The entity to add the address to
$address Sulu\Bundle\ContactBundle\Entity\Address The address to be added
$isMain boolean Defines if the address is the main Address of the contact
리턴 Sulu\Bundle\ContactBundle\Entity\ContactAddress

delete() 공개 메소드

Deletes the contact for the given id.
public delete ( ) : Closure
리턴 Closure

findByFilters() 공개 메소드

public findByFilters ( $filters, $page, $pageSize, $limit, $locale, $options = [] )

findById() 공개 메소드

Find a contact by it's id.
public findById ( integer $id ) : mixed | null
$id integer
리턴 mixed | null

getAddressRelations() 공개 메소드

Returns a collection of relations to get addresses.
public getAddressRelations ( $entity ) : mixed
$entity
리턴 mixed

getApiObject() 보호된 메소드

Takes a contact entity and a locale and returns the api object.
protected getApiObject ( Contact $contact, string $locale ) : Contact
$contact Sulu\Bundle\ContactBundle\Entity\Contact
$locale string
리턴 Sulu\Bundle\ContactBundle\Api\Contact

getById() 공개 메소드

public getById ( $id, $locale ) : mixed
$id
$locale
리턴 mixed

getByIds() 공개 메소드

Returns contact entities by ids.
public getByIds ( $ids, $locale ) : mixed
$ids
$locale
리턴 mixed

getContact() 공개 메소드

Returns an api entity for an doctrine entity.
public getContact ( $contact, $locale ) : null | Contact
$contact
$locale
리턴 null | Sulu\Bundle\ContactBundle\Entity\Contact

getContactEntityName() 공개 메소드

Get contact entity name.
public getContactEntityName ( ) : string
리턴 string

removeAddressRelation() 공개 메소드

removes the address relation from a contact and also deletes the address if it has no more relations.
public removeAddressRelation ( Contact $contact, ContactAddress $contactAddress ) : mixed | void
$contact Sulu\Bundle\ContactBundle\Entity\Contact
$contactAddress Sulu\Bundle\ContactBundle\Entity\ContactAddress
리턴 mixed | void

save() 공개 메소드

Creates a new contact for the given data.
public save ( array $data, integer | null $id = null, boolean $patch = false, boolean $flush = true ) : Contact
$data array
$id integer | null
$patch boolean
$flush boolean
리턴 Sulu\Bundle\ContactBundle\Entity\Contact

setMainAccount() 공개 메소드

public setMainAccount ( Contact $contact, $data )
$contact Sulu\Bundle\ContactBundle\Entity\Contact
$data

setTitleOnContact() 공개 메소드

public setTitleOnContact ( $contact, $titleId )
$contact
$titleId

프로퍼티 상세

$mediaRepository 보호되어 있는 프로퍼티

protected MediaRepositoryInterface,Sulu\Bundle\MediaBundle\Entity $mediaRepository
리턴 Sulu\Bundle\MediaBundle\Entity\MediaRepositoryInterface