| 1 |
<?php |
| 2 |
|
| 3 |
namespace ipl\Web\FormElement\TermInput; |
| 4 |
|
| 5 |
interface Term |
| 6 |
{ |
| 7 |
/** @var string The default validation constraint */ |
| 8 |
public const DEFAULT_CONSTRAINT = \ipl\Web\Control\SearchBar\ValidatedTerm::DEFAULT_PATTERN; |
| 9 |
|
| 10 |
/** |
| 11 |
* Set the search value |
| 12 |
* |
| 13 |
* @param string $value |
| 14 |
* |
| 15 |
* @return $this |
| 16 |
*/ |
| 17 |
public function setSearchValue(string $value); |
| 18 |
|
| 19 |
/** |
| 20 |
* Get the search value |
| 21 |
* |
| 22 |
* @return string |
| 23 |
*/ |
| 24 |
public function getSearchValue(): string; |
| 25 |
|
| 26 |
/** |
| 27 |
* Set the label |
| 28 |
* |
| 29 |
* @param string $label |
| 30 |
* |
| 31 |
* @return $this |
| 32 |
*/ |
| 33 |
public function setLabel(string $label); |
| 34 |
|
| 35 |
/** |
| 36 |
* Get the label |
| 37 |
* |
| 38 |
* @return ?string |
| 39 |
*/ |
| 40 |
public function getLabel(): ?string; |
| 41 |
|
| 42 |
/** |
| 43 |
* Set the CSS class |
| 44 |
* |
| 45 |
* @param string $class |
| 46 |
* |
| 47 |
* @return $this |
| 48 |
*/ |
| 49 |
public function setClass(string $class); |
| 50 |
|
| 51 |
/** |
| 52 |
* Get the CSS class |
| 53 |
* |
| 54 |
* @return ?string |
| 55 |
*/ |
| 56 |
public function getClass(): ?string; |
| 57 |
|
| 58 |
/** |
| 59 |
* Set the failure message |
| 60 |
* |
| 61 |
* @param string $message |
| 62 |
* |
| 63 |
* @return $this |
| 64 |
*/ |
| 65 |
public function setMessage(string $message); |
| 66 |
|
| 67 |
/** |
| 68 |
* Get the failure message |
| 69 |
* |
| 70 |
* @return ?string |
| 71 |
*/ |
| 72 |
public function getMessage(): ?string; |
| 73 |
|
| 74 |
/** |
| 75 |
* Set the validation constraint |
| 76 |
* |
| 77 |
* @param string $pattern |
| 78 |
* |
| 79 |
* @return $this |
| 80 |
*/ |
| 81 |
public function setPattern(string $pattern); |
| 82 |
|
| 83 |
/** |
| 84 |
* Get the validation constraint |
| 85 |
* |
| 86 |
* @return ?string |
| 87 |
*/ |
| 88 |
public function getPattern(): ?string; |
| 89 |
} |