Navigation Menu

Skip to content

Commit

Permalink
Remove $options argument from ContextInterface::val() to maintain BC.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed May 29, 2016
1 parent 57e7877 commit 14f9199
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions src/View/Form/ContextInterface.php
Expand Up @@ -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'.
Expand Down
2 changes: 1 addition & 1 deletion src/View/Form/NullContext.php
Expand Up @@ -70,7 +70,7 @@ public function isCreate()
/**
* {@inheritDoc}
*/
public function val($field, $options = [])
public function val($field)
{
return $this->_request->data($field);
}
Expand Down

0 comments on commit 14f9199

Please sign in to comment.