BConnect Business - Reference PHP

ActivitySectorController extends AbstractController
in package

FinalYes
Attributes
#[IsGranted]
"ROLE_SUPPORT"
#[Route]
'/activity/sector'

Table of Contents

Methods

edit()  : Response
Edit an existing ActivitySector entity.
index()  : Response
Displays a list of activity sectors and handles the creation of a new activity sector.

Methods

edit()

Edit an existing ActivitySector entity.

public edit(Request $request, ActivitySector $activitySector, EntityManagerInterface $entityManager) : Response

This method handles the form submission for editing an ActivitySector entity. If the form is submitted and valid, the changes are persisted to the database. A success flash message is added and the user is redirected to the activity sector index page. If the form is not submitted or not valid, the edit form is rendered again.

Parameters
$request : Request

The current request instance.

$activitySector : ActivitySector

The ActivitySector entity to be edited.

$entityManager : EntityManagerInterface

The entity manager for persisting changes.

Attributes
#[Route]
'/{id}/edit'
$name: 'app_activity_sector_edit'
$methods: ['GET', 'POST']
Return values
Response

The response object containing the rendered view or redirection.

index()

Displays a list of activity sectors and handles the creation of a new activity sector.

public index(ActivitySectorRepository $activitySectorRepository, Request $request, EntityManagerInterface $entityManager) : Response
Parameters
$activitySectorRepository : ActivitySectorRepository

Repository to fetch activity sectors.

$request : Request

The current request instance.

$entityManager : EntityManagerInterface

The entity manager to handle database operations.

Attributes
#[Route]
'/'
$name: 'app_activity_sector_index'
Return values
Response

The response object containing the rendered view.

On this page

Search results