Property | Type | Description | |
---|---|---|---|
$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 |
Method | Description | |
---|---|---|
__construct ( Doctrine\Common\Persistence\ObjectManager $em, Sulu\Bundle\TagBundle\Tag\TagManagerInterface $tagManager, Sulu\Bundle\MediaBundle\Media\Manager\MediaManagerInterface $mediaManager ) | ||
addNewContactRelations ( |
adds new relations. | |
contactIsEmployeeOfAccount ( $contact, $account ) : boolean | checks if an account is employee of a company. | |
createMainAccountContact ( |
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, |
Returns AccountContact relation if exists. | |
getAddressByCondition ( Sulu\Bundle\ContactBundle\Entity\AccountInterface | |
Returns an address by callback-condition. | |
getAddressTypeByName ( $name ) : mixed | return address type by name. | |
getBillingAddress ( Sulu\Bundle\ContactBundle\Entity\AccountInterface | |
Returns the billing address of an account/contact. | |
getDeliveryAddress ( Sulu\Bundle\ContactBundle\Entity\AccountInterface | |
Returns the delivery address. | |
getEmailTypeByName ( $name ) : mixed | return email type by name. | |
getFaxTypeByName ( $name ) : mixed | return fax type by name. | |
getMainAccountContact ( |
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 ( |
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 ( |
sets Entity's Main-Email. | |
setMainFax ( |
sets Entity's Main-Fax. | |
setMainForCollection ( $arrayCollection ) | sets the first element to main, if none is set. | |
setMainPhone ( |
sets Entity's Main-Phone. | |
setMainUrl ( |
sets Entity's Main-Url. | |
unsetMain ( $arrayCollection ) : boolean | unsets main of all elements of an ArrayCollection | PersistanceCollection. |
Method | Description | |
---|---|---|
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 ( |
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 ) : |
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 ( |
Updates the given address. | |
updateBankAccount ( |
Updates the given note. | |
updateEmail ( |
Updates the given email address. | |
updateFax ( |
||
updateNote ( |
Updates the given note. | |
updatePhone ( |
Updates the given phone. | |
updateUrl ( |
Method | Description | |
---|---|---|
getAddresses ( Sulu\Bundle\ContactBundle\Entity\AccountInterface | |
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. |
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 |
protected addBankAccount ( $contact, $data ) : boolean | ||
$contact | ||
$data | ||
return | boolean |
protected addCategories ( $contact, $data ) : boolean | ||
$contact | ||
$data | ||
return | boolean |
public addNewContactRelations ( |
||
$contact | ||
$data | array |
protected checkAndSetMainAddress ( $addresses ) : mixed | ||
$addresses | ||
return | mixed |
public contactIsEmployeeOfAccount ( $contact, $account ) : boolean | ||
$contact | ||
$account | ||
return | boolean |
protected createAddress ( array $addressData, &$isMain = null ) : |
||
$addressData | array | |
$isMain | returns if address is main address | |
return |
public createMainAccountContact ( |
||
$contact | ||
$account | Sulu\Bundle\ContactBundle\Entity\AccountInterface | |
$position | ||
return |
public deleteAddresses ( $entity ) | ||
$entity |
protected deleteAllEntitiesOfCollection ( $arrayCollection ) | ||
$arrayCollection |
public deleteAllRelations ( $entity ) | ||
$entity |
public deleteEmails ( $entity ) | ||
$entity |
public deleteFaxes ( $entity ) | ||
$entity |
public deleteNotes ( $entity ) | ||
$entity |
public deletePhones ( $entity ) | ||
$entity |
public deleteUrls ( $entity ) | ||
$entity |
public getAccounContact ( Sulu\Bundle\ContactBundle\Entity\AccountInterface $account, |
||
$account | Sulu\Bundle\ContactBundle\Entity\AccountInterface | |
$contact | ||
return | null | |
public getAddressByCondition ( Sulu\Bundle\ContactBundle\Entity\AccountInterface | |
||
$entity | Sulu\Bundle\ContactBundle\Entity\AccountInterface | |
|
$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 |
return | mixed |
public getAddressTypeByName ( $name ) : mixed | ||
$name | ||
return | mixed |
public getBillingAddress ( Sulu\Bundle\ContactBundle\Entity\AccountInterface | |
||
$entity | Sulu\Bundle\ContactBundle\Entity\AccountInterface | |
|
$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 |
return | mixed |
protected getBooleanValue ( $value ) : boolean | ||
$value | ||
return | boolean |
public getDeliveryAddress ( Sulu\Bundle\ContactBundle\Entity\AccountInterface | |
||
$entity | Sulu\Bundle\ContactBundle\Entity\AccountInterface | |
|
$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 |
return | mixed |
public getEmailTypeByName ( $name ) : mixed | ||
$name | ||
return | mixed |
public getFaxTypeByName ( $name ) : mixed | ||
$name | ||
return | mixed |
public getMainAccountContact ( |
||
$contact | ||
return |
public getPhoneTypeByName ( $name ) : mixed | ||
$name | ||
return | mixed |
public getPosition ( $data ) : mixed | ||
return | mixed |
public getTagManager ( ) : Sulu\Bundle\TagBundle\Tag\TagManagerInterface | ||
return | Sulu\Bundle\TagBundle\Tag\TagManagerInterface |
public getUrlTypeByName ( $name ) : mixed | ||
$name | ||
return | mixed |
public processAddresses ( $contact, array $addresses ) : boolean | ||
$contact | The contact on which is worked | |
$addresses | array | |
return | boolean | True if the processing was sucessful, otherwise false |
public processBankAccounts ( $contact, $bankAccounts ) : boolean | ||
$contact | ||
$bankAccounts | ||
return | boolean | True if the processing was sucessful, otherwise false |
public processCategories ( $contact, $categories ) : boolean | ||
$contact | - the contact which is processed | |
$categories | ||
return | boolean | True if the processing was successful, otherwise false |
public processEmails ( $contact, $emails ) : boolean | ||
$contact | The contact on which is worked | |
$emails | ||
return | boolean | True if the processing was successful, otherwise false |
public processFaxes ( $contact, array $faxes ) : boolean | ||
$contact | ||
$faxes | array | |
return | boolean |
public processNotes ( |
||
$contact | The contact on which is worked | |
$notes | ||
return | boolean | True if the processing was successful, otherwise false |
public processPhones ( $contact, $phones ) : boolean | ||
$contact | The contact on which is processed | |
$phones | ||
return | boolean | True if the processing was successful, otherwise false |
public processTags ( $contact, array $tags ) : boolean | ||
$contact | The contact on which is worked | |
$tags | array | |
return | boolean | True if the processing was successful, otherwise false |
public processUrls ( $contact, array $urls ) : boolean | ||
$contact | The contact to be processed | |
$urls | array | |
return | boolean | True if the processing was successful, otherwise false |
public setMainEmail ( |
||
$entity |
public setMainFax ( |
||
$entity |
public setMainForCollection ( $arrayCollection ) | ||
$arrayCollection |
public setMainPhone ( |
||
$entity |
public setMainUrl ( |
||
$entity |
protected updateAddress ( |
||
$address | The phone object to update | |
$entry | mixed | The entry with the new data |
$isMain | boolean | returns if address should be set to main |
return | boolean | True if successful, otherwise false |
protected updateBankAccount ( |
||
$entity | The phone object to update | |
$data | string | The entry with the new data |
return | boolean | True if successful, otherwise false |
protected updateEmail ( |
||
The email object to update | ||
$entry | array | The entry with the new data |
return | boolean | True if successful, otherwise false |
protected updateNote ( |
||
$note | ||
$entry | array | The entry with the new data |
return | boolean | True if successful, otherwise false |
protected updatePhone ( |
||
$phone | The phone object to update | |
$entry | The entry with the new data | |
return | boolean | True if successful, otherwise false |
protected ObjectManager,Doctrine\Common\Persistence $em | ||
return | Doctrine\Common\Persistence\ObjectManager |
protected MediaManagerInterface,Sulu\Bundle\MediaBundle\Media\Manager $mediaManager | ||
return | Sulu\Bundle\MediaBundle\Media\Manager\MediaManagerInterface |
protected TagManagerInterface,Sulu\Bundle\TagBundle\Tag $tagManager | ||
return | Sulu\Bundle\TagBundle\Tag\TagManagerInterface |