SectionService
in package
Class SectionService
Provides services for managing sections.
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructor for the SectionService class.
- getSectionById() : Section
- Retrieves a section by its ID.
Properties
$sectionRepository
private
SectionRepository
$sectionRepository
Methods
__construct()
Constructor for the SectionService class.
public
__construct(SectionRepository $sectionRepository) : mixed
Initializes the section repository.
Parameters
- $sectionRepository : SectionRepository
-
The repository for managing sections.
getSectionById()
Retrieves a section by its ID.
public
getSectionById(int $idSection) : Section
Parameters
- $idSection : int
-
The ID of the section to retrieve.
Return values
Section —Returns the section if found.