diff --git a/src/View/Form/ContextInterface.php b/src/View/Form/ContextInterface.php index ad4047a16fd..93b44c47f44 100644 --- a/src/View/Form/ContextInterface.php +++ b/src/View/Form/ContextInterface.php @@ -46,16 +46,19 @@ public function isCreate(); /** * Get the current value for a given field. * - * @param string $field A dot separated path to the field a value - * is needed for. - * @param array $options Options: + * Classes implementing this method can optionally have a second argument + * `$options`. Valid key for `$options` array are: + * * - `default`: Default value to return if no value found in request * data or context record. * - `schemaDefault`: Boolen indicating whether default value from * context's schema should be used if it's not explicitly provided. + * + * @param string $field A dot separated path to the field a value + * is needed for. * @return mixed */ - public function val($field, $options = []); + public function val($field); /** * Check if a given field is 'required'. diff --git a/src/View/Form/NullContext.php b/src/View/Form/NullContext.php index f2a8dab41fe..2ff17978207 100644 --- a/src/View/Form/NullContext.php +++ b/src/View/Form/NullContext.php @@ -70,7 +70,7 @@ public function isCreate() /** * {@inheritDoc} */ - public function val($field, $options = []) + public function val($field) { return $this->_request->data($field); }