* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ declare(strict_types=1); namespace PrestaShop\PrestaShop\Core\Domain\Title\Command; use PrestaShop\PrestaShop\Core\Domain\Title\ValueObject\TitleId; /** * Deletes states on bulk action */ class BulkDeleteTitleCommand { /** * @var array */ private $titleIds; /** * @param array $titleIds */ public function __construct(array $titleIds) { $this->setTitleIds($titleIds); } /** * @return array */ public function getTitleIds(): array { return $this->titleIds; } /** * @param array $titleIds */ private function setTitleIds(array $titleIds): void { foreach ($titleIds as $stateId) { $this->titleIds[] = new TitleId((int) $stateId); } } }