ImportProductsCommand
extends Command
in package
Attributes
- #[AsCommand]
- $name: 'app:import-products'
- $description: 'Import products from an Excel file into the Product table'
Table of Contents
Properties
- $categoryRepository : CategoryRepository
- $entityManager : EntityManagerInterface
- $userRepository : UserRepository
Methods
- __construct() : mixed
- execute() : int
- cleanNumber() : float
Properties
$categoryRepository
private
CategoryRepository
$categoryRepository
$entityManager
private
EntityManagerInterface
$entityManager
$userRepository
private
UserRepository
$userRepository
Methods
__construct()
public
__construct(EntityManagerInterface $entityManager, CategoryRepository $categoryRepository, UserRepository $userRepository) : mixed
Parameters
- $entityManager : EntityManagerInterface
- $categoryRepository : CategoryRepository
- $userRepository : UserRepository
execute()
protected
execute(InputInterface $input, OutputInterface $output) : int
Parameters
- $input : InputInterface
- $output : OutputInterface
Return values
intcleanNumber()
private
cleanNumber(mixed $value) : float
Parameters
- $value : mixed