PluginProbe
The Innovative Form Builder – IvyForms / 1.5.1
The Innovative Form Builder – IvyForms v1.5.1
1.5.1 1.5 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 All 27 releases
ivyforms / backend / src / Repository / Form / FormRepositoryInterface.php

FormRepositoryInterface.php in The Innovative Form Builder – IvyForms 1.5.1, at backend/src/Repository/Form/FormRepositoryInterface.php

74 lines 1.6 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\Form;
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 FormRepositoryInterface extends BaseRepositoryInterface
13 {
14 /**
15 * Check if a form exists in the database.
16 *
17 * @param int $formId
18 * @return bool
19 */
20 public function exists(int $formId): bool;
21
22 /**
23 * @param list<int> $formIds
24 * @return list<int> Subset of $formIds that exist in the database.
25 */
26 public function filterExistingIds(array $formIds): array;
27
28 /**
29 * @return list<int>
30 */
31 public function getAllIds(): array;
32
33 /**
34 * @return list<array{id:int, name:string}>
35 */
36 public function getIdNamePairs(): array;
37
38 /**
39 * @param list<int> $formIds
40 * @return array<int, string> Map of form id => name.
41 */
42 public function getNamesByIds(array $formIds): array;
43
44 /**
45 * @param int $formId
46 * @param string $value
47 *
48 * @return bool
49 */
50 public function updateFormStarred(int $formId, string $value): bool;
51
52 /**
53 * @param int $formId
54 * @param string $value
55 *
56 * @return bool
57 */
58 public function updateFormStatus(int $formId, string $value): bool;
59
60 /**
61 * Get the count of form filters.
62 *
63 * @return array<string, int>
64 */
65 public function getFilterCount(): array;
66
67 /**
68 * Get the earliest form creation timestamp.
69 *
70 * @return string|null DATETIME as stored in the database
71 */
72 public function getEarliestCreatedAt(): ?string;
73 }
74