mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 12:08:47 +02:00
N°8772 - cleanup code
This commit is contained in:
@@ -64,6 +64,7 @@ class AbstractFormIO
|
||||
public function SetOwnerBlock(AbstractFormBlock $oOwnerBlock): self
|
||||
{
|
||||
$this->oOwnerBlock = $oOwnerBlock;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -87,6 +88,7 @@ class AbstractFormIO
|
||||
public function SetName(string $sName): self
|
||||
{
|
||||
$this->sName = $sName;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -136,6 +138,7 @@ class AbstractFormIO
|
||||
{
|
||||
$PostSetDataExist = array_key_exists(FormEvents::POST_SET_DATA, $this->aValues) && $this->aValues[FormEvents::POST_SET_DATA] !== null;
|
||||
$PostSubmitExist = array_key_exists(FormEvents::POST_SUBMIT, $this->aValues) && $this->aValues[FormEvents::POST_SUBMIT] !== null;
|
||||
|
||||
return $PostSetDataExist || $PostSubmitExist;
|
||||
}
|
||||
|
||||
@@ -170,12 +173,13 @@ class AbstractFormIO
|
||||
*/
|
||||
public function Value(): mixed
|
||||
{
|
||||
if(array_key_exists(FormEvents::POST_SUBMIT, $this->aValues) ){
|
||||
if (array_key_exists(FormEvents::POST_SUBMIT, $this->aValues)) {
|
||||
return $this->aValues[FormEvents::POST_SUBMIT];
|
||||
}
|
||||
if(array_key_exists(FormEvents::POST_SET_DATA, $this->aValues) ){
|
||||
if (array_key_exists(FormEvents::POST_SET_DATA, $this->aValues)) {
|
||||
return $this->aValues[FormEvents::POST_SET_DATA];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user