PHP Class Sulu\Bundle\ContactBundle\Api\Contact

Inheritance: extends Sulu\Component\Rest\ApiWrapper
Afficher le fichier Open project: sulu/sulu Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Contact $contact, string $locale )
addCategory ( Sulu\Bundle\CategoryBundle\Entity\CategoryInterface $category ) : Contact Add category.
addEmail ( Email $email ) : Contact Add email.
addFax ( Fax $fax ) : Contact Add fax.
addLocale ( ContactLocale $locale ) : Contact Add locale.
addMedia ( Sulu\Bundle\MediaBundle\Entity\MediaInterface $media ) : Contact Add media.
addNote ( Note $note ) : Contact Add note.
addPhone ( Phone $phone ) : Contact Add phone.
addTag ( Tag $tag ) : Contact Add tag.
addUrl ( Url $url ) : Contact Add url.
getAccount ( ) Returns main account.
getAddresses ( ) Returns main addresses.
getAvatar ( ) : Media Get the contacts avatar and return the array of different formats.
getBankAccounts ( ) : array Get bank accounts.
getBirthday ( ) : DateTime Get birthday.
getCategories ( ) : Category[] Get categories.
getChanged ( ) : DateTime Get changed.
getCreated ( ) : DateTime Get created.
getEmails ( ) : array Get emails.
getFaxes ( ) : array Get faxes.
getFirstName ( ) : string Get first name.
getFormOfAddress ( ) : integer Get form of address.
getFullName ( ) : string
getGender ( ) : string Get gender.
getId ( ) : integer Get id.
getLastName ( ) : string Get last name.
getLocales ( ) : array Get locales.
getMainAddress ( ) : mixed Returns the main address.
getMainEmail ( ) : string Get main email.
getMainFax ( ) : string Get main fax.
getMainPhone ( ) : string Get main phone.
getMainUrl ( ) : string Get main url.
getMedias ( ) : Media[] Get medias.
getMiddleName ( ) : string Get middle name.
getNewsletter ( ) : boolean Get newsletter.
getNotes ( ) : array Get notes.
getPhones ( ) : array Get phones.
getPosition ( ) : string Get position.
getSalutation ( ) : string Get salutation.
getTags ( ) : array Get tags.
getTitle ( ) : string Get title.
getType ( ) : string Get type of api entity.
getUrls ( ) : array Get urls.
removeCategory ( Sulu\Bundle\CategoryBundle\Entity\CategoryInterface $category ) Remove category.
removeEmail ( Email $email ) Remove email.
removeFax ( Fax $fax ) Remove fax.
removeLocale ( ContactLocale $locale ) : Contact Remove locale.
removeMedia ( Sulu\Bundle\MediaBundle\Entity\MediaInterface $media ) Remove media.
removeNote ( Note $note ) Remove note.
removePhone ( Phone $phone ) Remove phone.
removeTag ( Tag $tag ) Remove tag.
removeUrl ( Url $url ) Remove url.
setAvatar ( Media $avatar ) Sets the avatar (media-api object).
setBirthday ( DateTime $birthday ) : Contact Set birthday.
setChanger ( Sulu\Component\Security\Authentication\UserInterface $changer = null ) : Contact Set changer.
setCreator ( Sulu\Component\Security\Authentication\UserInterface $creator = null ) : Contact Set creator.
setCurrentPosition ( $position ) Sets current position.
setFirstName ( string $firstName ) : Contact Set first name.
setFormOfAddress ( integer $formOfAddress ) : Contact Set form of address.
setGender ( string $gender ) : Contact Set gender.
setLastName ( string $lastName ) : Contact Set last name.
setMainEmail ( string $mainEmail ) : Contact Set main email.
setMainFax ( string $mainFax ) : Contact Set main fax.
setMainPhone ( string $mainPhone ) : Contact Set main phone.
setMainUrl ( string $mainUrl ) : Contact Set main url.
setMiddleName ( string $middleName ) : Contact Set middle name.
setNewsletter ( boolean $newsletter ) : Contact Set newsletter.
setPosition ( string $position ) : Contact Set position.
setSalutation ( string $salutation ) : Contact Set salutation.
setTitle ( object $title ) : Contact Set title.
toArray ( ) : array

Method Details

__construct() public méthode

public __construct ( Contact $contact, string $locale )
$contact Sulu\Bundle\ContactBundle\Entity\Contact
$locale string The locale of this product

addCategory() public méthode

Add category.
public addCategory ( Sulu\Bundle\CategoryBundle\Entity\CategoryInterface $category ) : Contact
$category Sulu\Bundle\CategoryBundle\Entity\CategoryInterface
Résultat Contact

addEmail() public méthode

Add email.
public addEmail ( Email $email ) : Contact
$email Sulu\Bundle\ContactBundle\Entity\Email
Résultat Contact

addFax() public méthode

Add fax.
public addFax ( Fax $fax ) : Contact
$fax Sulu\Bundle\ContactBundle\Entity\Fax
Résultat Contact

addLocale() public méthode

Add locale.
public addLocale ( ContactLocale $locale ) : Contact
$locale Sulu\Bundle\ContactBundle\Entity\ContactLocale
Résultat Contact

addMedia() public méthode

Add media.
public addMedia ( Sulu\Bundle\MediaBundle\Entity\MediaInterface $media ) : Contact
$media Sulu\Bundle\MediaBundle\Entity\MediaInterface
Résultat Contact

addNote() public méthode

Add note.
public addNote ( Note $note ) : Contact
$note Sulu\Bundle\ContactBundle\Entity\Note
Résultat Contact

addPhone() public méthode

Add phone.
public addPhone ( Phone $phone ) : Contact
$phone Sulu\Bundle\ContactBundle\Entity\Phone
Résultat Contact

addTag() public méthode

Add tag.
public addTag ( Tag $tag ) : Contact
$tag Sulu\Bundle\TagBundle\Entity\Tag
Résultat Contact

addUrl() public méthode

Add url.
public addUrl ( Url $url ) : Contact
$url Sulu\Bundle\ContactBundle\Entity\Url
Résultat Contact

getAccount() public méthode

Returns main account.
public getAccount ( )

getAddresses() public méthode

Returns main addresses.
public getAddresses ( )

getAvatar() public méthode

Get the contacts avatar and return the array of different formats.
public getAvatar ( ) : Media
Résultat Sulu\Bundle\MediaBundle\Api\Media

getBankAccounts() public méthode

Get bank accounts.
public getBankAccounts ( ) : array
Résultat array

getBirthday() public méthode

Get birthday.
public getBirthday ( ) : DateTime
Résultat DateTime

getCategories() public méthode

Get categories.
public getCategories ( ) : Category[]
Résultat Sulu\Bundle\CategoryBundle\Api\Category[]

getChanged() public méthode

Get changed.
public getChanged ( ) : DateTime
Résultat DateTime

getCreated() public méthode

Get created.
public getCreated ( ) : DateTime
Résultat DateTime

getEmails() public méthode

Get emails.
public getEmails ( ) : array
Résultat array

getFaxes() public méthode

Get faxes.
public getFaxes ( ) : array
Résultat array

getFirstName() public méthode

Get first name.
public getFirstName ( ) : string
Résultat string

getFormOfAddress() public méthode

Get form of address.
public getFormOfAddress ( ) : integer
Résultat integer

getFullName() public méthode

public getFullName ( ) : string
Résultat string

getGender() public méthode

Get gender.
public getGender ( ) : string
Résultat string

getId() public méthode

Get id.
public getId ( ) : integer
Résultat integer

getLastName() public méthode

Get last name.
public getLastName ( ) : string
Résultat string

getLocales() public méthode

Get locales.
public getLocales ( ) : array
Résultat array

getMainAddress() public méthode

Returns the main address.
public getMainAddress ( ) : mixed
Résultat mixed

getMainEmail() public méthode

Get main email.
public getMainEmail ( ) : string
Résultat string

getMainFax() public méthode

Get main fax.
public getMainFax ( ) : string
Résultat string

getMainPhone() public méthode

Get main phone.
public getMainPhone ( ) : string
Résultat string

getMainUrl() public méthode

Get main url.
public getMainUrl ( ) : string
Résultat string

getMedias() public méthode

Get medias.
public getMedias ( ) : Media[]
Résultat Sulu\Bundle\MediaBundle\Api\Media[]

getMiddleName() public méthode

Get middle name.
public getMiddleName ( ) : string
Résultat string

getNewsletter() public méthode

Get newsletter.
public getNewsletter ( ) : boolean
Résultat boolean

getNotes() public méthode

Get notes.
public getNotes ( ) : array
Résultat array

getPhones() public méthode

Get phones.
public getPhones ( ) : array
Résultat array

getPosition() public méthode

Get position.
public getPosition ( ) : string
Résultat string

getSalutation() public méthode

Get salutation.
public getSalutation ( ) : string
Résultat string

getTags() public méthode

Get tags.
public getTags ( ) : array
Résultat array

getTitle() public méthode

Get title.
public getTitle ( ) : string
Résultat string

getType() public méthode

Get type of api entity.
public getType ( ) : string
Résultat string

getUrls() public méthode

Get urls.
public getUrls ( ) : array
Résultat array

removeCategory() public méthode

Remove category.
public removeCategory ( Sulu\Bundle\CategoryBundle\Entity\CategoryInterface $category )
$category Sulu\Bundle\CategoryBundle\Entity\CategoryInterface

removeEmail() public méthode

Remove email.
public removeEmail ( Email $email )
$email Sulu\Bundle\ContactBundle\Entity\Email

removeFax() public méthode

Remove fax.
public removeFax ( Fax $fax )
$fax Sulu\Bundle\ContactBundle\Entity\Fax

removeLocale() public méthode

Remove locale.
public removeLocale ( ContactLocale $locale ) : Contact
$locale Sulu\Bundle\ContactBundle\Entity\ContactLocale
Résultat Contact

removeMedia() public méthode

Remove media.
public removeMedia ( Sulu\Bundle\MediaBundle\Entity\MediaInterface $media )
$media Sulu\Bundle\MediaBundle\Entity\MediaInterface

removeNote() public méthode

Remove note.
public removeNote ( Note $note )
$note Sulu\Bundle\ContactBundle\Entity\Note

removePhone() public méthode

Remove phone.
public removePhone ( Phone $phone )
$phone Sulu\Bundle\ContactBundle\Entity\Phone

removeTag() public méthode

Remove tag.
public removeTag ( Tag $tag )
$tag Sulu\Bundle\TagBundle\Entity\Tag

removeUrl() public méthode

Remove url.
public removeUrl ( Url $url )
$url Sulu\Bundle\ContactBundle\Entity\Url

setAvatar() public méthode

Sets the avatar (media-api object).
public setAvatar ( Media $avatar )
$avatar Sulu\Bundle\MediaBundle\Api\Media

setBirthday() public méthode

Set birthday.
public setBirthday ( DateTime $birthday ) : Contact
$birthday DateTime
Résultat Contact

setChanger() public méthode

Set changer.
public setChanger ( Sulu\Component\Security\Authentication\UserInterface $changer = null ) : Contact
$changer Sulu\Component\Security\Authentication\UserInterface
Résultat Contact

setCreator() public méthode

Set creator.
public setCreator ( Sulu\Component\Security\Authentication\UserInterface $creator = null ) : Contact
$creator Sulu\Component\Security\Authentication\UserInterface
Résultat Contact

setCurrentPosition() public méthode

Sets current position.
public setCurrentPosition ( $position )
$position

setFirstName() public méthode

Set first name.
public setFirstName ( string $firstName ) : Contact
$firstName string
Résultat Contact

setFormOfAddress() public méthode

Set form of address.
public setFormOfAddress ( integer $formOfAddress ) : Contact
$formOfAddress integer
Résultat Contact

setGender() public méthode

Set gender.
public setGender ( string $gender ) : Contact
$gender string
Résultat Contact

setLastName() public méthode

Set last name.
public setLastName ( string $lastName ) : Contact
$lastName string
Résultat Contact

setMainEmail() public méthode

Set main email.
public setMainEmail ( string $mainEmail ) : Contact
$mainEmail string
Résultat Contact

setMainFax() public méthode

Set main fax.
public setMainFax ( string $mainFax ) : Contact
$mainFax string
Résultat Contact

setMainPhone() public méthode

Set main phone.
public setMainPhone ( string $mainPhone ) : Contact
$mainPhone string
Résultat Contact

setMainUrl() public méthode

Set main url.
public setMainUrl ( string $mainUrl ) : Contact
$mainUrl string
Résultat Contact

setMiddleName() public méthode

Set middle name.
public setMiddleName ( string $middleName ) : Contact
$middleName string
Résultat Contact

setNewsletter() public méthode

Set newsletter.
public setNewsletter ( boolean $newsletter ) : Contact
$newsletter boolean
Résultat Contact

setPosition() public méthode

Set position.
public setPosition ( string $position ) : Contact
$position string
Résultat Contact

setSalutation() public méthode

Set salutation.
public setSalutation ( string $salutation ) : Contact
$salutation string
Résultat Contact

setTitle() public méthode

Set title.
public setTitle ( object $title ) : Contact
$title object
Résultat Contact

toArray() public méthode

public toArray ( ) : array
Résultat array