BConnect POS - Reference PHP

SupplierController extends AbstractController
in package

Management of the supplier directory.

Covers CRUD, the supplier detail view, search, archiving/unarchiving and DataTables lists. Suppliers feed the warehouse stock and the purchase orders.

Attributes
#[IsGranted]
'IS_AUTHENTICATED_FULLY'
#[Route]
'/supplier'

Table of Contents

Methods

archiver()  : RedirectResponse
Method for archived a supplier
create()  : Response
Method for creating a new supplier
datatable()  : JsonResponse
Provides paginated/filtered supplier data in the DataTables server-side format.
delete()  : RedirectResponse
Method for deleting a single supplier
desarchiver()  : RedirectResponse
Method for desarchived a supplier
index()  : Response
Method for displaying list of suppliers
indexArchive()  : Response
Method to displaying a list of archived supplier
search()  : Response
Method to search a supplier with information supplier
show()  : Response
Method to show retail a single supplier
update()  : Response
Method to update a information supplier

Methods

archiver()

Method for archived a supplier

public archiver(Supplier $supplier, EntityManagerInterface $doctrine) : RedirectResponse
Parameters
$supplier : Supplier
$doctrine : EntityManagerInterface
Attributes
#[Route]
'/archive/{id}'
$name: 'supplier.archive'
Return values
RedirectResponse

create()

Method for creating a new supplier

public create(EntityManagerInterface $doctrine, Request $request) : Response
Parameters
$doctrine : EntityManagerInterface
$request : Request
Attributes
#[Route]
'/create'
$name: 'supplier.create'
Return values
Response

datatable()

Provides paginated/filtered supplier 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: 'supplier.datatable'
$methods: ['GET']
Return values
JsonResponse

DataTables-compatible JSON response.

delete()

Method for deleting a single supplier

public delete(EntityManagerInterface $doctrine, Supplier $supplier) : RedirectResponse
Parameters
$doctrine : EntityManagerInterface
$supplier : Supplier
Attributes
#[Route]
'/delete/{id}'
$name: 'supplier.delete'
Return values
RedirectResponse

desarchiver()

Method for desarchived a supplier

public desarchiver(Supplier $supplier, EntityManagerInterface $doctrine) : RedirectResponse
Parameters
$supplier : Supplier
$doctrine : EntityManagerInterface
Attributes
#[Route]
'/desarchive/{id}'
$name: 'supplier.desarchive'
Return values
RedirectResponse

index()

Method for displaying list of suppliers

public index(EntityManagerInterface $doctrine, Request $request) : Response
Parameters
$doctrine : EntityManagerInterface
$request : Request
Attributes
#[Route]
'/'
$name: 'supplier.index'
Return values
Response

indexArchive()

Method to displaying a list of archived supplier

public indexArchive(EntityManagerInterface $entityManager) : Response
Parameters
$entityManager : EntityManagerInterface
Attributes
#[Route]
'/index/archive'
$name: 'supplier.index.archive'
Return values
Response

Method to search a supplier with information supplier

public search(Request $request, SearchService $searchService) : Response
Parameters
$request : Request
$searchService : SearchService
Attributes
#[Route]
'/search'
$name: 'supplier.search'
$methods: 'POST'
Return values
Response

show()

Method to show retail a single supplier

public show(Supplier $supplier) : Response
Parameters
$supplier : Supplier
Attributes
#[Route]
'/show/{id}'
$name: 'supplier.show'
Return values
Response

update()

Method to update a information supplier

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

Search results