PHP Class Sulu\Bundle\ContactBundle\Controller\ContactController

Inheritance: extends Sulu\Component\Rest\RestController, implements FOS\RestBundle\Routing\ClassResourceInterface, implements Sulu\Component\Security\SecuredControllerInterface
Afficher le fichier Open project: sulu/sulu

Protected Properties

Свойство Type Description
$accountContactEntityName
$accountContactFieldDescriptors
$basePath string
$bundlePrefix
$contactSerializationGroups serialization groups for contact
$entityKey
$fieldDescriptors Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptor[]
$positionEntityName

Méthodes publiques

Méthode Description
cgetAction ( Request $request ) : Response lists all contacts optional parameter 'flat' calls listAction.
deleteAction ( integer $id ) : Response Deletes a Contact with the given ID from database.
fieldsAction ( Request $request ) : Response returns all fields that can be used by list.
getAction ( $id ) : Response Shows the contact with the given Id.
getSecurityContext ( )
patchAction ( $id, Request $request ) : Response Partially update an existing contact.
postAction ( Request $request ) : Response Creates a new contact.
putAction ( $id, Request $request ) : Response

Méthodes protégées

Méthode Description
getAccountContactFieldDescriptors ( )
getContactManager ( ) : ContactManager
getContactsByUserSystem ( ) Returns a list of contacts which have a user in the sulu system.
getFieldDescriptors ( )
getRestHelper ( ) : Sulu\Component\Rest\RestHelperInterface

Private Methods

Méthode Description
addAvatars ( array $contacts, string $locale ) : array Takes an array of contacts and resets the avatar containing the media id with the actual urls to the avatars thumbnail.
checkArguments ( Request $request ) https://github.com/sulu-io/sulu/issues/1136
getComparator ( ) : Sulu\Bundle\ContactBundle\Util\IndexComparatorInterface
getList ( Request $request, string $locale ) : ListRepresentation Returns list for cget.
initFieldDescriptors ( )
prepareListResponse ( Request $request, DoctrineListBuilder $listBuilder, string $locale ) : array Prepare list response.

Method Details

cgetAction() public méthode

lists all contacts optional parameter 'flat' calls listAction.
public cgetAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
Résultat Symfony\Component\HttpFoundation\Response

deleteAction() public méthode

Deletes a Contact with the given ID from database.
public deleteAction ( integer $id ) : Response
$id integer
Résultat Symfony\Component\HttpFoundation\Response

fieldsAction() public méthode

returns all fields that can be used by list.
public fieldsAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
Résultat Symfony\Component\HttpFoundation\Response

getAccountContactFieldDescriptors() protected méthode

getAction() public méthode

Shows the contact with the given Id.
public getAction ( $id ) : Response
$id
Résultat Symfony\Component\HttpFoundation\Response

getContactManager() protected méthode

protected getContactManager ( ) : ContactManager
Résultat Sulu\Bundle\ContactBundle\Contact\ContactManager

getContactsByUserSystem() protected méthode

Returns a list of contacts which have a user in the sulu system.
protected getContactsByUserSystem ( )

getFieldDescriptors() protected méthode

protected getFieldDescriptors ( )

getRestHelper() protected méthode

protected getRestHelper ( ) : Sulu\Component\Rest\RestHelperInterface
Résultat Sulu\Component\Rest\RestHelperInterface

getSecurityContext() public méthode

public getSecurityContext ( )

patchAction() public méthode

Partially update an existing contact.
public patchAction ( $id, Request $request ) : Response
$id
$request Symfony\Component\HttpFoundation\Request
Résultat Symfony\Component\HttpFoundation\Response

postAction() public méthode

Creates a new contact.
public postAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
Résultat Symfony\Component\HttpFoundation\Response

putAction() public méthode

public putAction ( $id, Request $request ) : Response
$id
$request Symfony\Component\HttpFoundation\Request
Résultat Symfony\Component\HttpFoundation\Response

Property Details

$accountContactEntityName protected_oe static_oe property

protected static $accountContactEntityName

$accountContactFieldDescriptors protected_oe property

protected $accountContactFieldDescriptors

$basePath protected_oe property

protected string $basePath
Résultat string

$bundlePrefix protected_oe property

protected $bundlePrefix

$contactSerializationGroups protected_oe static_oe property

serialization groups for contact
protected static $contactSerializationGroups

$entityKey protected_oe static_oe property

protected static $entityKey

$fieldDescriptors protected_oe property

protected DoctrineFieldDescriptor[],Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor $fieldDescriptors
Résultat Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptor[]

$positionEntityName protected_oe static_oe property

protected static $positionEntityName