namespace Combodo\iTop\Form\Field; use Str; use utils; /** * Description of PhoneField * * @author Guillaume Lajarige */ class PhoneField extends StringField { /** * @inheritDoc * @throws \ConfigException * @throws \CoreException */ public function GetDisplayValue() { $sLabel = Str::pure2html($this->currentValue); if (utils::StrLen($sLabel) > 128) { // Truncate the length to 128 characters, by removing the middle $sLabel = substr($sLabel, 0, 100).'.....'.substr($sLabel, -20); } $sUrlDecorationClass = utils::GetConfig()->Get('phone_number_decoration_class'); return "currentValue\">$sLabel"; } }