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

상속: implements Sulu\Bundle\ContactBundle\Contact\ContactManagerInterface, use trait Sulu\Component\Persistence\RelationTrait
파일 보기 프로젝트 열기: sulu/sulu 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$accountContactEntityName
$addressEntityName
$addressTypeEntityName
$categoryEntityName
$countryEntityName
$em Doctrine\Common\Persistence\ObjectManager
$emailEntityName
$emailTypeEntityName
$faxTypeEntityName
$mediaManager Sulu\Bundle\MediaBundle\Media\Manager\MediaManagerInterface
$phoneEntityName
$phoneTypeEntityName
$positionEntityName
$tagManager Sulu\Bundle\TagBundle\Tag\TagManagerInterface
$urlEntityName
$urlTypeEntityName

공개 메소드들

메소드 설명
__construct ( Doctrine\Common\Persistence\ObjectManager $em, Sulu\Bundle\TagBundle\Tag\TagManagerInterface $tagManager, Sulu\Bundle\MediaBundle\Media\Manager\MediaManagerInterface $mediaManager )
addNewContactRelations ( Contact $contact, array $data ) adds new relations.
contactIsEmployeeOfAccount ( $contact, $account ) : boolean checks if an account is employee of a company.
createMainAccountContact ( Contact $contact, Sulu\Bundle\ContactBundle\Entity\AccountInterface $account, $position = null ) : AccountContact creates a new main Account Contacts relation.
deleteAddresses ( $entity ) deletes all addresses that are assigned to entity.
deleteAllRelations ( $entity ) clears all relational data from entity and deletes it.
deleteEmails ( $entity ) deletes all emails that are assigned to entity.
deleteFaxes ( $entity ) deletes all faxes that are assigned to entity.
deleteNotes ( $entity ) deletes all notes that are assigned to entity.
deletePhones ( $entity ) deletes all phones that are assigned to entity.
deleteUrls ( $entity ) deletes all urls that are assigned to entity.
getAccounContact ( Sulu\Bundle\ContactBundle\Entity\AccountInterface $account, Contact $contact ) : null | AccountContact Returns AccountContact relation if exists.
getAddressByCondition ( Sulu\Bundle\ContactBundle\Entity\AccountInterface | Contact $entity, callable $conditionCallback, boolean $force = false ) : mixed Returns an address by callback-condition.
getAddressTypeByName ( $name ) : mixed return address type by name.
getBillingAddress ( Sulu\Bundle\ContactBundle\Entity\AccountInterface | Contact $entity, boolean $force = false ) : mixed Returns the billing address of an account/contact.
getDeliveryAddress ( Sulu\Bundle\ContactBundle\Entity\AccountInterface | Contact $entity, boolean $force = false ) : mixed Returns the delivery address.
getEmailTypeByName ( $name ) : mixed return email type by name.
getFaxTypeByName ( $name ) : mixed return fax type by name.
getMainAccountContact ( Contact | Sulu\Bundle\ContactBundle\Entity\AccountInterface $contact ) : AccountContact | boolean returns the main account-contact relation.
getPhoneTypeByName ( $name ) : mixed return phone type by name.
getPosition ( $data ) : mixed Get a position object.
getTagManager ( ) : Sulu\Bundle\TagBundle\Tag\TagManagerInterface Returns the tag manager.
getUrlTypeByName ( $name ) : mixed return url type by name.
processAddresses ( $contact, array $addresses ) : boolean Process all addresses from request.
processBankAccounts ( $contact, $bankAccounts ) : boolean Process all bankAccounts of a request.
processCategories ( $contact, $categories ) : boolean Process all categories of request.
processEmails ( $contact, $emails ) : boolean Process all emails from request.
processFaxes ( $contact, array $faxes ) : boolean
processNotes ( Contact $contact, $notes ) : boolean Process all notes from request.
processPhones ( $contact, $phones ) : boolean Process all phones from request.
processTags ( $contact, array $tags ) : boolean Process all tags of request.
processUrls ( $contact, array $urls ) : boolean Process all urls of request.
setMainEmail ( Contact | Sulu\Bundle\ContactBundle\Entity\AccountInterface $entity ) sets Entity's Main-Email.
setMainFax ( Contact | Sulu\Bundle\ContactBundle\Entity\AccountInterface $entity ) sets Entity's Main-Fax.
setMainForCollection ( $arrayCollection ) sets the first element to main, if none is set.
setMainPhone ( Contact | Sulu\Bundle\ContactBundle\Entity\AccountInterface $entity ) sets Entity's Main-Phone.
setMainUrl ( Contact | Sulu\Bundle\ContactBundle\Entity\AccountInterface $entity ) sets Entity's Main-Url.
unsetMain ( $arrayCollection ) : boolean unsets main of all elements of an ArrayCollection | PersistanceCollection.

보호된 메소드들

메소드 설명
addBankAccount ( $contact, $data ) : boolean Add a new note to the given contact and persist it with the given object manager.
addCategories ( $contact, $data ) : boolean Adds a new category to the given contact.
addEmail ( Contact $contact, array $emailData ) : boolean Adds a new email to the given contact and persist it with the given object manager.
addFax ( $contact, array $faxData )
addNote ( $contact, array $noteData ) : boolean Add a new note to the given contact and persist it with the given object manager.
addPhone ( $contact, array $phoneData ) : boolean Add a new phone to the given contact and persist it with the given object manager.
addTag ( $contact, $data ) : boolean Adds a new tag to the given contact and persist it with the given object manager.
addUrl ( $contact, $data ) : boolean Adds a new tag to the given contact.
checkAndSetMainAddress ( $addresses ) : mixed sets main address.
createAddress ( array $addressData, &$isMain = null ) : Address Creates an address based on the data passed.
deleteAllEntitiesOfCollection ( $arrayCollection )
getBooleanValue ( $value ) : boolean Checks if a value is a boolean and converts it if necessary and returns it.
updateAddress ( Address $address, mixed $entry, boolean &$isMain = null ) : boolean Updates the given address.
updateBankAccount ( BankAccount $entity, string $data ) : boolean Updates the given note.
updateEmail ( Email $email, array $entry ) : boolean Updates the given email address.
updateFax ( Fax $fax, $entry ) : boolean
updateNote ( Note $note, array $entry ) : boolean Updates the given note.
updatePhone ( Phone $phone, $entry ) : boolean Updates the given phone.
updateUrl ( Url $url, $entry ) : boolean

비공개 메소드들

메소드 설명
getAddresses ( Sulu\Bundle\ContactBundle\Entity\AccountInterface | Contact $entity ) : Doctrine\Common\Collections\Collection | null returns addresses from account or contact.
getProperty ( array $data, string $key, string $default = null ) : string | null Return property for key or given default value.
hasMain ( $arrayCollection, &$mainEntity = null ) : mixed checks if a collection for main attribute.
resetIndexOfSubentites ( mixed $entities ) TODO: this is just a hack to avoid relations that start with index != 0 otherwise deserialization process will parse relations as object instead of an array reindex entities.

메소드 상세

__construct() 공개 메소드

public __construct ( Doctrine\Common\Persistence\ObjectManager $em, Sulu\Bundle\TagBundle\Tag\TagManagerInterface $tagManager, Sulu\Bundle\MediaBundle\Media\Manager\MediaManagerInterface $mediaManager )
$em Doctrine\Common\Persistence\ObjectManager
$tagManager Sulu\Bundle\TagBundle\Tag\TagManagerInterface
$mediaManager Sulu\Bundle\MediaBundle\Media\Manager\MediaManagerInterface

addBankAccount() 보호된 메소드

Add a new note to the given contact and persist it with the given object manager.
protected addBankAccount ( $contact, $data ) : boolean
$contact
$data
리턴 boolean

addCategories() 보호된 메소드

Adds a new category to the given contact.
protected addCategories ( $contact, $data ) : boolean
$contact
$data
리턴 boolean

addEmail() 보호된 메소드

Adds a new email to the given contact and persist it with the given object manager.
protected addEmail ( Contact $contact, array $emailData ) : boolean
$contact Sulu\Bundle\ContactBundle\Entity\Contact
$emailData array
리턴 boolean

addFax() 보호된 메소드

protected addFax ( $contact, array $faxData )
$contact
$faxData array

addNewContactRelations() 공개 메소드

adds new relations.
public addNewContactRelations ( Contact $contact, array $data )
$contact Sulu\Bundle\ContactBundle\Entity\Contact
$data array

addNote() 보호된 메소드

Add a new note to the given contact and persist it with the given object manager.
protected addNote ( $contact, array $noteData ) : boolean
$contact
$noteData array
리턴 boolean True if there was no error, otherwise false

addPhone() 보호된 메소드

Add a new phone to the given contact and persist it with the given object manager.
protected addPhone ( $contact, array $phoneData ) : boolean
$contact
$phoneData array
리턴 boolean True if there was no error, otherwise false

addTag() 보호된 메소드

Adds a new tag to the given contact and persist it with the given object manager.
protected addTag ( $contact, $data ) : boolean
$contact
$data
리턴 boolean True if there was no error, otherwise false

addUrl() 보호된 메소드

Adds a new tag to the given contact.
protected addUrl ( $contact, $data ) : boolean
$contact
$data
리턴 boolean

checkAndSetMainAddress() 보호된 메소드

sets main address.
protected checkAndSetMainAddress ( $addresses ) : mixed
$addresses
리턴 mixed

contactIsEmployeeOfAccount() 공개 메소드

checks if an account is employee of a company.
public contactIsEmployeeOfAccount ( $contact, $account ) : boolean
$contact
$account
리턴 boolean

createAddress() 보호된 메소드

Creates an address based on the data passed.
protected createAddress ( array $addressData, &$isMain = null ) : Address
$addressData array
$isMain returns if address is main address
리턴 Sulu\Bundle\ContactBundle\Entity\Address

createMainAccountContact() 공개 메소드

creates a new main Account Contacts relation.
public createMainAccountContact ( Contact $contact, Sulu\Bundle\ContactBundle\Entity\AccountInterface $account, $position = null ) : AccountContact
$contact Sulu\Bundle\ContactBundle\Entity\Contact
$account Sulu\Bundle\ContactBundle\Entity\AccountInterface
$position
리턴 Sulu\Bundle\ContactBundle\Entity\AccountContact

deleteAddresses() 공개 메소드

deletes all addresses that are assigned to entity.
public deleteAddresses ( $entity )
$entity

deleteAllEntitiesOfCollection() 보호된 메소드

protected deleteAllEntitiesOfCollection ( $arrayCollection )
$arrayCollection

deleteAllRelations() 공개 메소드

clears all relational data from entity and deletes it.
public deleteAllRelations ( $entity )
$entity

deleteEmails() 공개 메소드

deletes all emails that are assigned to entity.
public deleteEmails ( $entity )
$entity

deleteFaxes() 공개 메소드

deletes all faxes that are assigned to entity.
public deleteFaxes ( $entity )
$entity

deleteNotes() 공개 메소드

deletes all notes that are assigned to entity.
public deleteNotes ( $entity )
$entity

deletePhones() 공개 메소드

deletes all phones that are assigned to entity.
public deletePhones ( $entity )
$entity

deleteUrls() 공개 메소드

deletes all urls that are assigned to entity.
public deleteUrls ( $entity )
$entity

getAccounContact() 공개 메소드

Returns AccountContact relation if exists.
public getAccounContact ( Sulu\Bundle\ContactBundle\Entity\AccountInterface $account, Contact $contact ) : null | AccountContact
$account Sulu\Bundle\ContactBundle\Entity\AccountInterface
$contact Sulu\Bundle\ContactBundle\Entity\Contact
리턴 null | Sulu\Bundle\ContactBundle\Entity\AccountContact

getAddressByCondition() 공개 메소드

Returns an address by callback-condition.
public getAddressByCondition ( Sulu\Bundle\ContactBundle\Entity\AccountInterface | Contact $entity, callable $conditionCallback, boolean $force = false ) : mixed
$entity Sulu\Bundle\ContactBundle\Entity\AccountInterface | Sulu\Bundle\ContactBundle\Entity\Contact
$conditionCallback callable
$force boolean Forces function to return an address if any address is defined if no delivery address is defined it will first return the main address then any
리턴 mixed

getAddressTypeByName() 공개 메소드

return address type by name.
public getAddressTypeByName ( $name ) : mixed
$name
리턴 mixed

getBillingAddress() 공개 메소드

Returns the billing address of an account/contact.
public getBillingAddress ( Sulu\Bundle\ContactBundle\Entity\AccountInterface | Contact $entity, boolean $force = false ) : mixed
$entity Sulu\Bundle\ContactBundle\Entity\AccountInterface | Sulu\Bundle\ContactBundle\Entity\Contact
$force boolean Forces function to return an address if any address is defined if no delivery address is defined it will first return the main address then any
리턴 mixed

getBooleanValue() 보호된 메소드

Checks if a value is a boolean and converts it if necessary and returns it.
protected getBooleanValue ( $value ) : boolean
$value
리턴 boolean

getDeliveryAddress() 공개 메소드

Returns the delivery address.
public getDeliveryAddress ( Sulu\Bundle\ContactBundle\Entity\AccountInterface | Contact $entity, boolean $force = false ) : mixed
$entity Sulu\Bundle\ContactBundle\Entity\AccountInterface | Sulu\Bundle\ContactBundle\Entity\Contact
$force boolean Forces function to return an address if any address is defined if no delivery address is defined it will first return the main address then any
리턴 mixed

getEmailTypeByName() 공개 메소드

return email type by name.
public getEmailTypeByName ( $name ) : mixed
$name
리턴 mixed

getFaxTypeByName() 공개 메소드

return fax type by name.
public getFaxTypeByName ( $name ) : mixed
$name
리턴 mixed

getMainAccountContact() 공개 메소드

returns the main account-contact relation.
public getMainAccountContact ( Contact | Sulu\Bundle\ContactBundle\Entity\AccountInterface $contact ) : AccountContact | boolean
$contact Sulu\Bundle\ContactBundle\Entity\Contact | Sulu\Bundle\ContactBundle\Entity\AccountInterface
리턴 Sulu\Bundle\ContactBundle\Entity\AccountContact | boolean

getPhoneTypeByName() 공개 메소드

return phone type by name.
public getPhoneTypeByName ( $name ) : mixed
$name
리턴 mixed

getPosition() 공개 메소드

Get a position object.
public getPosition ( $data ) : mixed
리턴 mixed

getTagManager() 공개 메소드

Returns the tag manager.
public getTagManager ( ) : Sulu\Bundle\TagBundle\Tag\TagManagerInterface
리턴 Sulu\Bundle\TagBundle\Tag\TagManagerInterface

getUrlTypeByName() 공개 메소드

return url type by name.
public getUrlTypeByName ( $name ) : mixed
$name
리턴 mixed

processAddresses() 공개 메소드

Process all addresses from request.
public processAddresses ( $contact, array $addresses ) : boolean
$contact The contact on which is worked
$addresses array
리턴 boolean True if the processing was sucessful, otherwise false

processBankAccounts() 공개 메소드

Process all bankAccounts of a request.
public processBankAccounts ( $contact, $bankAccounts ) : boolean
$contact
$bankAccounts
리턴 boolean True if the processing was sucessful, otherwise false

processCategories() 공개 메소드

Process all categories of request.
public processCategories ( $contact, $categories ) : boolean
$contact - the contact which is processed
$categories
리턴 boolean True if the processing was successful, otherwise false

processEmails() 공개 메소드

Process all emails from request.
public processEmails ( $contact, $emails ) : boolean
$contact The contact on which is worked
$emails
리턴 boolean True if the processing was successful, otherwise false

processFaxes() 공개 메소드

public processFaxes ( $contact, array $faxes ) : boolean
$contact
$faxes array
리턴 boolean

processNotes() 공개 메소드

Process all notes from request.
public processNotes ( Contact $contact, $notes ) : boolean
$contact Sulu\Bundle\ContactBundle\Entity\Contact The contact on which is worked
$notes
리턴 boolean True if the processing was successful, otherwise false

processPhones() 공개 메소드

Process all phones from request.
public processPhones ( $contact, $phones ) : boolean
$contact The contact on which is processed
$phones
리턴 boolean True if the processing was successful, otherwise false

processTags() 공개 메소드

Process all tags of request.
public processTags ( $contact, array $tags ) : boolean
$contact The contact on which is worked
$tags array
리턴 boolean True if the processing was successful, otherwise false

processUrls() 공개 메소드

Process all urls of request.
public processUrls ( $contact, array $urls ) : boolean
$contact The contact to be processed
$urls array
리턴 boolean True if the processing was successful, otherwise false

setMainEmail() 공개 메소드

sets Entity's Main-Email.
public setMainEmail ( Contact | Sulu\Bundle\ContactBundle\Entity\AccountInterface $entity )
$entity Sulu\Bundle\ContactBundle\Entity\Contact | Sulu\Bundle\ContactBundle\Entity\AccountInterface

setMainFax() 공개 메소드

sets Entity's Main-Fax.
public setMainFax ( Contact | Sulu\Bundle\ContactBundle\Entity\AccountInterface $entity )
$entity Sulu\Bundle\ContactBundle\Entity\Contact | Sulu\Bundle\ContactBundle\Entity\AccountInterface

setMainForCollection() 공개 메소드

sets the first element to main, if none is set.
public setMainForCollection ( $arrayCollection )
$arrayCollection

setMainPhone() 공개 메소드

sets Entity's Main-Phone.
public setMainPhone ( Contact | Sulu\Bundle\ContactBundle\Entity\AccountInterface $entity )
$entity Sulu\Bundle\ContactBundle\Entity\Contact | Sulu\Bundle\ContactBundle\Entity\AccountInterface

setMainUrl() 공개 메소드

sets Entity's Main-Url.
public setMainUrl ( Contact | Sulu\Bundle\ContactBundle\Entity\AccountInterface $entity )
$entity Sulu\Bundle\ContactBundle\Entity\Contact | Sulu\Bundle\ContactBundle\Entity\AccountInterface

unsetMain() 공개 메소드

unsets main of all elements of an ArrayCollection | PersistanceCollection.
public unsetMain ( $arrayCollection ) : boolean
$arrayCollection
리턴 boolean returns true if a element was unset

updateAddress() 보호된 메소드

Updates the given address.
protected updateAddress ( Address $address, mixed $entry, boolean &$isMain = null ) : boolean
$address Sulu\Bundle\ContactBundle\Entity\Address The phone object to update
$entry mixed The entry with the new data
$isMain boolean returns if address should be set to main
리턴 boolean True if successful, otherwise false

updateBankAccount() 보호된 메소드

Updates the given note.
protected updateBankAccount ( BankAccount $entity, string $data ) : boolean
$entity Sulu\Bundle\ContactBundle\Entity\BankAccount The phone object to update
$data string The entry with the new data
리턴 boolean True if successful, otherwise false

updateEmail() 보호된 메소드

Updates the given email address.
protected updateEmail ( Email $email, array $entry ) : boolean
$email Sulu\Bundle\ContactBundle\Entity\Email The email object to update
$entry array The entry with the new data
리턴 boolean True if successful, otherwise false

updateFax() 보호된 메소드

protected updateFax ( Fax $fax, $entry ) : boolean
$fax Sulu\Bundle\ContactBundle\Entity\Fax
$entry
리턴 boolean

updateNote() 보호된 메소드

Updates the given note.
protected updateNote ( Note $note, array $entry ) : boolean
$note Sulu\Bundle\ContactBundle\Entity\Note
$entry array The entry with the new data
리턴 boolean True if successful, otherwise false

updatePhone() 보호된 메소드

Updates the given phone.
protected updatePhone ( Phone $phone, $entry ) : boolean
$phone Sulu\Bundle\ContactBundle\Entity\Phone The phone object to update
$entry The entry with the new data
리턴 boolean True if successful, otherwise false

updateUrl() 보호된 메소드

protected updateUrl ( Url $url, $entry ) : boolean
$url Sulu\Bundle\ContactBundle\Entity\Url
$entry
리턴 boolean

프로퍼티 상세

$accountContactEntityName 보호되어 있는 정적으로 프로퍼티

protected static $accountContactEntityName

$addressEntityName 보호되어 있는 정적으로 프로퍼티

protected static $addressEntityName

$addressTypeEntityName 보호되어 있는 정적으로 프로퍼티

protected static $addressTypeEntityName

$categoryEntityName 보호되어 있는 정적으로 프로퍼티

protected static $categoryEntityName

$countryEntityName 보호되어 있는 정적으로 프로퍼티

protected static $countryEntityName

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

protected ObjectManager,Doctrine\Common\Persistence $em
리턴 Doctrine\Common\Persistence\ObjectManager

$emailEntityName 보호되어 있는 정적으로 프로퍼티

protected static $emailEntityName

$emailTypeEntityName 보호되어 있는 정적으로 프로퍼티

protected static $emailTypeEntityName

$faxTypeEntityName 보호되어 있는 정적으로 프로퍼티

protected static $faxTypeEntityName

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

protected MediaManagerInterface,Sulu\Bundle\MediaBundle\Media\Manager $mediaManager
리턴 Sulu\Bundle\MediaBundle\Media\Manager\MediaManagerInterface

$phoneEntityName 보호되어 있는 정적으로 프로퍼티

protected static $phoneEntityName

$phoneTypeEntityName 보호되어 있는 정적으로 프로퍼티

protected static $phoneTypeEntityName

$positionEntityName 보호되어 있는 정적으로 프로퍼티

protected static $positionEntityName

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

protected TagManagerInterface,Sulu\Bundle\TagBundle\Tag $tagManager
리턴 Sulu\Bundle\TagBundle\Tag\TagManagerInterface

$urlEntityName 보호되어 있는 정적으로 프로퍼티

protected static $urlEntityName

$urlTypeEntityName 보호되어 있는 정적으로 프로퍼티

protected static $urlTypeEntityName