DirectorObjectForm: provide setSentValue helper
This commit is contained in:
parent
5c2f638593
commit
728c0745ae
|
@ -565,6 +565,18 @@ abstract class DirectorObjectForm extends QuickForm
|
|||
return $el;
|
||||
}
|
||||
|
||||
protected function setSentValue($name, $value)
|
||||
{
|
||||
if ($this->hasBeenSent()) {
|
||||
$request = $this->getRequest();
|
||||
if ($value !== null && $request->isPost() && $request->getPost($name) !== null) {
|
||||
$request->setPost($name, $value);
|
||||
}
|
||||
}
|
||||
|
||||
return $this->setElementValue($name, $value);
|
||||
}
|
||||
|
||||
protected function setElementValue($name, $value = null, $inherited = null, $inheritedFrom = null)
|
||||
{
|
||||
$el = $this->getElement($name);
|
||||
|
|
Loading…
Reference in New Issue