PluginProbe
The Innovative Form Builder – IvyForms / 0.8
The Innovative Form Builder – IvyForms v0.8
1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 1.2 1.3
ivyforms / backend / src / Repository / Field / FieldRepositoryInterface.php

FieldRepositoryInterface.php in The Innovative Form Builder – IvyForms 0.8, at backend/src/Repository/Field/FieldRepositoryInterface.php

57 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace IvyForms\Repository\Field;
4
5 // phpcs:disable PSR1.Files.SideEffects
6 if (!defined('ABSPATH')) {
7 exit; // Exit if accessed directly
8 }
9
10 use IvyForms\Repository\BaseRepositoryInterface;
11
12 interface FieldRepositoryInterface extends BaseRepositoryInterface
13 {
14 /**
15 * Get all fields by specific form ID.
16 *
17 * @param int $id
18 *
19 * @return mixed[]|null The array of entities
20 */
21 public function getFieldsById(int $id): ?array;
22
23 /**
24 * Get multiple fields by their IDs in a single query.
25 *
26 * @param int[] $fieldIds
27 * @return array<int, object> Indexed by field ID
28 */
29 public function getFieldsByIds(array $fieldIds): array;
30
31 /**
32 * Delete multiple fields by their IDs in a single query.
33 *
34 * @param int[] $ids
35 * @return int Number of deleted rows
36 */
37 public function deleteMany(array $ids): int;
38
39 /**
40 * Delete multiple fields by foreign key values (formId).
41 *
42 * @param array<int> $formIds
43 * @param string $foreignColumn
44 * @return int Number of deleted fields
45 */
46 public function deleteManyByForeignKeyValues(array $formIds, string $foreignColumn = 'formId'): int;
47
48 /**
49 * Delete fields by a single foreign key value (formId).
50 *
51 * @param int $formId
52 * @param string $foreignColumn
53 * @return int Number of deleted fields
54 */
55 public function deleteOneByForeignKeyValue(int $formId, string $foreignColumn = 'formId'): int;
56 }
57