- Added support for ExternalKey, LinkedSet, linkedSetIndirect, CaseLog to the new portal

- Fixed some bugs on the customfields integration with he portal

SVN:trunk[4003]
This commit is contained in:
Guillaume Lajarige
2016-04-18 15:07:58 +00:00
parent c9c6b2f7d5
commit 8834e1b49c
15 changed files with 1351 additions and 19 deletions

View File

@@ -26,14 +26,16 @@ use Combodo\iTop\Form\Validator\NotEmptyExtKeyValidator;
/**
* Description of SelectObjectField
*
* @author Romain Quetiez <romain.quetiez@combodo.com>
*/
class SelectObjectField extends Field
{
protected $oSearch;
protected $iMaximumComboLength;
protected $iMinAutoCompleteChars;
protected $bHierarchical;
protected $iControlType;
protected $sSearchEndpoint;
const CONTROL_SELECT = 1;
const CONTROL_RADIO_VERTICAL = 2;
@@ -44,22 +46,33 @@ class SelectObjectField extends Field
$this->oSearch = null;
$this->iMaximumComboLength = null;
$this->iMinAutoCompleteChars = 3;
$this->bHierarchical = false;
$this->iControlType = self::CONTROL_SELECT;
$this->sSearchEndpoint = null;
}
public function SetSearch(DBSearch $oSearch)
{
$this->oSearch = $oSearch;
return $this;
}
public function SetMaximumComboLength($iMaximumComboLength)
{
$this->iMaximumComboLength = $iMaximumComboLength;
return $this;
}
public function SetMinAutoCompleteChars($iMinAutoCompleteChars)
{
$this->iMinAutoCompleteChars = $iMinAutoCompleteChars;
return $this;
}
public function SetHierarchical($bHierarchical)
{
$this->bHierarchical = $bHierarchical;
return $this;
}
public function SetControlType($iControlType)
@@ -67,6 +80,12 @@ class SelectObjectField extends Field
$this->iControlType = $iControlType;
}
public function SetSearchEndpoint($sSearchEndpoint)
{
$this->sSearchEndpoint = $sSearchEndpoint;
return $this;
}
/**
* Sets if the field is mandatory or not.
* Setting the value will automatically add/remove a MandatoryValidator to the Field
@@ -112,8 +131,18 @@ class SelectObjectField extends Field
return $this->iMinAutoCompleteChars;
}
public function GetHierarchical()
{
return $this->bHierarchical;
}
public function GetControlType()
{
return $this->iControlType;
}
public function GetSearchEndpoint()
{
return $this->sSearchEndpoint;
}
}