mirror of
https://github.com/processwire/processwire.git
synced 2025-08-13 02:04:35 +02:00
Add new interfaces for Inputfield modules
This commit is contained in:
@@ -555,10 +555,68 @@ interface WireProfilerInterface {
|
|||||||
*/
|
*/
|
||||||
interface InputfieldHasArrayValue { }
|
interface InputfieldHasArrayValue { }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inputfield that doesn’t have an array value by default but can return array value or accept it
|
||||||
|
*
|
||||||
|
* @since 3.0.176
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
interface InputfieldSupportsArrayValue {
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function getArrayValue();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $value
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function setArrayValue(array $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inputfield that has a text value by default
|
||||||
|
*
|
||||||
|
* @since 3.0.176
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
interface InputfieldHasTextValue { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inputfield that has a sortable value (usually in addition to InputfieldHasArrayValue)
|
* Inputfield that has a sortable value (usually in addition to InputfieldHasArrayValue)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
interface InputfieldHasSortableValue { }
|
interface InputfieldHasSortableValue { }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inputfield that supports selectable options
|
||||||
|
*
|
||||||
|
* @since 3.0.176
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
interface InputfieldHasSelectableOptions {
|
||||||
|
/**
|
||||||
|
* Add a selectable option
|
||||||
|
*
|
||||||
|
* @param string|int $value
|
||||||
|
* @param string|null $label
|
||||||
|
* @param array|null $attributes
|
||||||
|
* @return self|$this
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function addOption($value, $label = null, array $attributes = null);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add selectable option with label, optionally for specific language
|
||||||
|
*
|
||||||
|
* @param string|int $value
|
||||||
|
* @param string $label
|
||||||
|
* @param Language|null $language
|
||||||
|
* @return self|$this
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function addOptionLabel($value, $label, $language = null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user