PHP Класс Sulu\Bundle\ContactBundle\Controller\AccountController

Наследование: extends Sulu\Component\Rest\RestController, implements FOS\RestBundle\Routing\ClassResourceInterface, implements Sulu\Component\Security\SecuredControllerInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$accountAddressEntityName
$accountAddressesFieldDescriptors
$accountContactEntityName
$accountContactFieldDescriptors
$accountManager Sulu\Bundle\ContactBundle\Contact\AccountManager
$accountSerializationGroups
$addressEntityName
$bundlePrefix
$contactEntityKey
$countryEntityName
$entityKey
$fieldDescriptors Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptor[]
$locale
$positionEntityName

Открытые методы

Метод Описание
cgetAction ( Request $request ) : Response Lists all accounts.
deleteAction ( $id, Request $request ) : Response Delete an account with the given id.
deleteContactsAction ( integer $accountId, integer $contactId ) : Response Deleted account contact.
fieldsAction ( ) : mixed Returns all fields that can be used by list.
getAction ( integer $id, Request $request ) : Response Shows a single account with the given id.
getAddressesAction ( integer $id, Request $request ) : Response Lists all addresses of an account optional parameter 'flat' calls listAction.
getContactsAction ( integer $id, Request $request ) : Response Lists all contacts of an account.
getDeleteinfoAction ( $id ) : Response Returns information about data which will be also deleted: 3 contacts, total number of contacts, and if deleting is allowed (as 0 or 1).
getSecurityContext ( )
multipledeleteinfoAction ( Request $request ) : Response Returns delete info for multiple ids.
patchAction ( $id, Request $request ) : Response Partial update of account infos.
postAction ( Request $request ) : Response Creates a new account.
putAction ( integer $id, Request $request ) : Response Edits the existing contact with the given id.
putContactsAction ( integer $accountId, $contactId, Request $request ) : Response

Защищенные методы

Метод Описание
applyRequestParameters ( Request $request, array $filter, DoctrineListBuilder $listBuilder ) Applies the filter parameter and hasNoparent parameter for listbuilder.
doPatch ( Sulu\Bundle\ContactBundle\Entity\AccountInterface $account, Request $request, Doctrine\Common\Persistence\ObjectManager $entityManager ) Process geiven entity for patch.
doPost ( Request $request ) : Sulu\Bundle\ContactBundle\Entity\AccountInterface Maps data from request to a new account.
doPut ( Sulu\Bundle\ContactBundle\Entity\AccountInterface $account, Request $request ) processes given entity for put.
generateFlatListBuilder ( ) : DoctrineListBuilder Creates a listbuilder instance.
getAccountAddressesFieldDescriptors ( ) : null | array
getAccountContactFieldDescriptors ( ) : null | array
getAccountEntityName ( ) : string
getAccountManager ( ) : AbstractContactManager
getFieldDescriptorForNoParent ( ) : DoctrineFieldDescriptor Returns fielddescriptor used for checking if account has no parent Will result in an error when added to the array of fielddescriptors because its just for checking if parent exists or not and does not point to a property of the parent.
getFieldDescriptors ( )
getRestHelper ( ) : Sulu\Component\Rest\RestHelperInterface
initAccountAddressesFieldDescriptors ( ) Inits the account contact descriptors.
initAccountContactFieldDescriptors ( ) Inits the account contact descriptors.
initFieldDescriptors ( ) Initializes the field descriptors.

Приватные методы

Метод Описание
addLogos ( array $accounts, string $locale ) : array Takes an array of accounts and resets the logo-property containing the media id with the actual urls to the logo thumbnails.
retrieveFilter ( Request $request, &$count ) : array Retrieves the ids from the request.
setParent ( array $parentData, Sulu\Bundle\ContactBundle\Entity\AccountInterface $account ) Set parent to account.

Описание методов

applyRequestParameters() защищенный Метод

Applies the filter parameter and hasNoparent parameter for listbuilder.
protected applyRequestParameters ( Request $request, array $filter, DoctrineListBuilder $listBuilder )
$request Symfony\Component\HttpFoundation\Request
$filter array
$listBuilder Sulu\Component\Rest\ListBuilder\Doctrine\DoctrineListBuilder

cgetAction() публичный Метод

Optional parameter 'flat' calls listAction.
public cgetAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
Результат Symfony\Component\HttpFoundation\Response

deleteAction() публичный Метод

Delete an account with the given id.
public deleteAction ( $id, Request $request ) : Response
$id
$request Symfony\Component\HttpFoundation\Request
Результат Symfony\Component\HttpFoundation\Response

deleteContactsAction() публичный Метод

Deleted account contact.
public deleteContactsAction ( integer $accountId, integer $contactId ) : Response
$accountId integer
$contactId integer
Результат Symfony\Component\HttpFoundation\Response

doPatch() защищенный Метод

Process geiven entity for patch.
protected doPatch ( Sulu\Bundle\ContactBundle\Entity\AccountInterface $account, Request $request, Doctrine\Common\Persistence\ObjectManager $entityManager )
$account Sulu\Bundle\ContactBundle\Entity\AccountInterface
$request Symfony\Component\HttpFoundation\Request
$entityManager Doctrine\Common\Persistence\ObjectManager

doPost() защищенный Метод

Maps data from request to a new account.
protected doPost ( Request $request ) : Sulu\Bundle\ContactBundle\Entity\AccountInterface
$request Symfony\Component\HttpFoundation\Request
Результат Sulu\Bundle\ContactBundle\Entity\AccountInterface

doPut() защищенный Метод

processes given entity for put.
protected doPut ( Sulu\Bundle\ContactBundle\Entity\AccountInterface $account, Request $request )
$account Sulu\Bundle\ContactBundle\Entity\AccountInterface
$request Symfony\Component\HttpFoundation\Request

fieldsAction() публичный Метод

Returns all fields that can be used by list.
public fieldsAction ( ) : mixed
Результат mixed

generateFlatListBuilder() защищенный Метод

Creates a listbuilder instance.
protected generateFlatListBuilder ( ) : DoctrineListBuilder
Результат Sulu\Component\Rest\ListBuilder\Doctrine\DoctrineListBuilder

getAccountAddressesFieldDescriptors() защищенный Метод

protected getAccountAddressesFieldDescriptors ( ) : null | array
Результат null | array

getAccountContactFieldDescriptors() защищенный Метод

protected getAccountContactFieldDescriptors ( ) : null | array
Результат null | array

getAccountEntityName() защищенный Метод

protected getAccountEntityName ( ) : string
Результат string

getAccountManager() защищенный Метод

protected getAccountManager ( ) : AbstractContactManager
Результат AbstractContactManager

getAction() публичный Метод

Shows a single account with the given id.
public getAction ( integer $id, Request $request ) : Response
$id integer
$request Symfony\Component\HttpFoundation\Request
Результат Symfony\Component\HttpFoundation\Response

getAddressesAction() публичный Метод

Lists all addresses of an account optional parameter 'flat' calls listAction.
public getAddressesAction ( integer $id, Request $request ) : Response
$id integer
$request Symfony\Component\HttpFoundation\Request
Результат Symfony\Component\HttpFoundation\Response

getContactsAction() публичный Метод

optional parameter 'flat' calls listAction.
public getContactsAction ( integer $id, Request $request ) : Response
$id integer
$request Symfony\Component\HttpFoundation\Request
Результат Symfony\Component\HttpFoundation\Response

getDeleteinfoAction() публичный Метод

Returns information about data which will be also deleted: 3 contacts, total number of contacts, and if deleting is allowed (as 0 or 1).
public getDeleteinfoAction ( $id ) : Response
$id
Результат Symfony\Component\HttpFoundation\Response

getFieldDescriptorForNoParent() защищенный Метод

Returns fielddescriptor used for checking if account has no parent Will result in an error when added to the array of fielddescriptors because its just for checking if parent exists or not and does not point to a property of the parent.
protected getFieldDescriptorForNoParent ( ) : DoctrineFieldDescriptor
Результат Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptor

getFieldDescriptors() защищенный Метод

protected getFieldDescriptors ( )

getRestHelper() защищенный Метод

protected getRestHelper ( ) : Sulu\Component\Rest\RestHelperInterface
Результат Sulu\Component\Rest\RestHelperInterface

getSecurityContext() публичный Метод

public getSecurityContext ( )

initAccountAddressesFieldDescriptors() защищенный Метод

Inits the account contact descriptors.

initAccountContactFieldDescriptors() защищенный Метод

Inits the account contact descriptors.

initFieldDescriptors() защищенный Метод

Initializes the field descriptors.
protected initFieldDescriptors ( )

multipledeleteinfoAction() публичный Метод

Returns delete info for multiple ids.
public multipledeleteinfoAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
Результат Symfony\Component\HttpFoundation\Response

patchAction() публичный Метод

Partial update of account infos.
public patchAction ( $id, Request $request ) : Response
$id
$request Symfony\Component\HttpFoundation\Request
Результат Symfony\Component\HttpFoundation\Response

postAction() публичный Метод

Creates a new account.
public postAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
Результат Symfony\Component\HttpFoundation\Response

putAction() публичный Метод

Edits the existing contact with the given id.
public putAction ( integer $id, Request $request ) : Response
$id integer The id of the contact to update
$request Symfony\Component\HttpFoundation\Request
Результат Symfony\Component\HttpFoundation\Response

putContactsAction() публичный Метод

public putContactsAction ( integer $accountId, $contactId, Request $request ) : Response
$accountId integer
$request Symfony\Component\HttpFoundation\Request
Результат Symfony\Component\HttpFoundation\Response

Описание свойств

$accountAddressEntityName защищенное статическое свойство

protected static $accountAddressEntityName

$accountAddressesFieldDescriptors защищенное свойство

protected $accountAddressesFieldDescriptors

$accountContactEntityName защищенное статическое свойство

protected static $accountContactEntityName

$accountContactFieldDescriptors защищенное свойство

protected $accountContactFieldDescriptors

$accountManager защищенное свойство

protected AccountManager,Sulu\Bundle\ContactBundle\Contact $accountManager
Результат Sulu\Bundle\ContactBundle\Contact\AccountManager

$accountSerializationGroups защищенное статическое свойство

protected static $accountSerializationGroups

$addressEntityName защищенное статическое свойство

protected static $addressEntityName

$bundlePrefix защищенное свойство

protected $bundlePrefix

$contactEntityKey защищенное статическое свойство

protected static $contactEntityKey

$countryEntityName защищенное статическое свойство

protected static $countryEntityName

$entityKey защищенное статическое свойство

protected static $entityKey

$fieldDescriptors защищенное свойство

protected DoctrineFieldDescriptor[],Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor $fieldDescriptors
Результат Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptor[]

$locale защищенное свойство

protected $locale

$positionEntityName защищенное статическое свойство

protected static $positionEntityName