BConnect POS - Reference PHP

InventoryController extends AbstractController
in package

InventoryController class handles all the actions related to inventory management.

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

Table of Contents

Methods

ArchiveInventory()  : Response
Method for archived a inventory
createInventoryForAllProduct()  : Response
This method creates a new inventory for all products in stock.
createInventoryForOneProduct()  : RedirectResponse|Response
This method creates a new inventory for a single product.
datatable()  : JsonResponse
Provides paginated/filtered inventory (sale products) data in the DataTables server-side format.
delete()  : RedirectResponse
Method for deleting a inventory
desarchiveInventory()  : Response
Method for desarchived a inventory
index()  : Response
Index route to display the list of inventories.
indexArchive()  : Response
Index route to display the list of inventories archived.
showDetailInventory()  : Response
Show a retail for single inventory
update()  : Response
Method for modifiying a inventory

Methods

ArchiveInventory()

Method for archived a inventory

public ArchiveInventory(Inventory $inventory, EntityManagerInterface $entityManager) : Response
Parameters
$inventory : Inventory
$entityManager : EntityManagerInterface
Attributes
#[Route]
'/archive/inventory/{id}'
$name: 'inventory.archive'
Return values
Response

createInventoryForAllProduct()

This method creates a new inventory for all products in stock.

public createInventoryForAllProduct(EntityManagerInterface $entityManager, Request $request) : Response
Parameters
$entityManager : EntityManagerInterface
$request : Request
Attributes
#[IsGranted]
'IS_AUTHENTICATED'
#[Route]
'/create/all'
$name: 'inventory.create.all'
Return values
Response

createInventoryForOneProduct()

This method creates a new inventory for a single product.

public createInventoryForOneProduct(EntityManagerInterface $entityManager, Request $request) : RedirectResponse|Response
Parameters
$entityManager : EntityManagerInterface
$request : Request
Attributes
#[IsGranted]
'IS_AUTHENTICATED'
#[Route]
'/create'
$name: 'inventory.create.one'
Return values
RedirectResponse|Response

datatable()

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

DataTables-compatible JSON response.

delete()

Method for deleting a inventory

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

desarchiveInventory()

Method for desarchived a inventory

public desarchiveInventory(Inventory $inventory, EntityManagerInterface $entityManager) : Response
Parameters
$inventory : Inventory
$entityManager : EntityManagerInterface
Attributes
#[Route]
'/desarchive/inventory/{id}'
$name: 'inventory.desarchive'
Return values
Response

indexArchive()

Index route to display the list of inventories archived.

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

showDetailInventory()

Show a retail for single inventory

public showDetailInventory(Inventory $inventory) : Response
Parameters
$inventory : Inventory
Attributes
#[Route]
'/show/inventory/{id}'
$name: 'inventory.show.retail'
Return values
Response

update()

Method for modifiying a inventory

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

Search results