BConnect POS - Reference PHP

FieldOfActivityController extends AbstractController
in package

Management of the fields of activity attached to products and the point of sale.

Provides the list (with creation via the index form), update, deletion and DataTables feeding.

Attributes
#[IsGranted]
'IS_AUTHENTICATED_FULLY'
#[Route]
'field/of/activity'

Table of Contents

Methods

datatable()  : JsonResponse
Provides paginated/filtered field-of-activity data in the DataTables server-side format.
delete()  : void
Deletes a field of activity entity.
index()  : Response
Renders the field of activity index page and handles the creation of new field of activities.
update()  : Response
Updates a field of activity entity and renders the update template.

Methods

datatable()

Provides paginated/filtered field-of-activity data in the DataTables server-side format.

public datatable(EntityManagerInterface $entityManager, Request $request, DataTableService $dataTableService) : JsonResponse
Parameters
$entityManager : EntityManagerInterface

Doctrine entity manager.

$request : Request

Request carrying the DataTables parameters.

$dataTableService : DataTableService

Service building the DataTables response.

Attributes
#[Route]
'/datatable'
$name: 'field.of.activity.datatable'
$methods: ['GET']
Return values
JsonResponse

DataTables-compatible JSON response.

delete()

Deletes a field of activity entity.

public delete(FieldOfActivity $fieldOfActivity, EntityManagerInterface $entityManager) : void
Parameters
$fieldOfActivity : FieldOfActivity
$entityManager : EntityManagerInterface
Attributes
#[Route]
'/delete/{id}'
$name: 'field.of.activity.delete'

index()

Renders the field of activity index page and handles the creation of new field of activities.

public index(EntityManagerInterface $entityManager, Request $request) : Response
Parameters
$entityManager : EntityManagerInterface
$request : Request
Attributes
#[Route]
'/'
$name: 'field.of.activity.index'
Return values
Response

update()

Updates a field of activity entity and renders the update template.

public update(FieldOfActivity $fieldOfActivity, Request $request, EntityManagerInterface $doctrine) : Response
Parameters
$fieldOfActivity : FieldOfActivity
$request : Request
$doctrine : EntityManagerInterface
Attributes
#[Route]
'/update/{id}'
$name: 'field.of.activity.update'
Return values
Response
On this page

Search results