| @@ -1,13 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | namespace IvyForms\Services\Entry\Managers; |
| 4 | 4 | |
| 5 | -// phpcs:disable PSR1.Files.SideEffects | |
| 6 | -if (!defined('ABSPATH')) { | |
| 7 | - exit; // Exit if accessed directly | |
| 8 | -} | |
| 9 | - | |
| 5 | +use IvyForms\Common\Exceptions\InvalidArgumentException; | |
| 10 | 6 | use IvyForms\Common\Exceptions\NotFoundException; |
| 11 | 7 | use IvyForms\Entity\Entry\Entry; |
| 12 | 8 | use IvyForms\Repository\Entry\EntryRepositoryInterface; |
| 13 | 9 | use IvyForms\Services\Translations\BackendStrings; |
| @@ -109,8 +105,21 @@ | ||
| 109 | 105 | */ |
| 110 | 106 | public function updateEntryStatus(int $entryId, string $status): void |
| 111 | 107 | { |
| 112 | 108 | $this->entryRepository->updateEntryStatus($entryId, $status); |
| 109 | + } | |
| 110 | + | |
| 111 | + /** | |
| 112 | + * Bulk update a column for multiple entries. | |
| 113 | + * | |
| 114 | + * @param string $column Column name to update | |
| 115 | + * @param mixed $value Value to set | |
| 116 | + * @param array<int> $ids Array of entry IDs | |
| 117 | + * @return int Number of updated entries | |
| 118 | + */ | |
| 119 | + public function bulkUpdateColumn(string $column, $value, array $ids): int | |
| 120 | + { | |
| 121 | + return $this->entryRepository->bulkUpdateColumn($column, $value, $ids); | |
| 113 | 122 | } |
| 114 | 123 | |
| 115 | 124 | /** |
| 116 | 125 | * Get all possible entry columns |