DisplayType = $context->GetFieldVariable($this->Options->Id, 'DisplayType', ''); } return 'core/Managers/FormManager/Fields/FBImagePicker.twig'; } public function GetIconData($iconName) { return $this->GetForm()->GetIcon($iconName); } protected function InternalSanitize($sanitizer) { parent::InternalSanitize($sanitizer); $item = $sanitizer->GetSanitizerByProperty('SelectedValues'); if($item != null) $item->Manager->AddIgnoreSanitizer("Icon", (Object) [], true); } protected function CanSanitize() { return true; } public function GetSizeStyles() { $width = $this->Options->ImageWidth; $height = $this->Options->ImageHeight; if($width != '') { if(strpos($width, '%') !== false) $width = 'width:' . $width . ';'; else $width = 'width:' . $width . 'px;'; } if($height != '') { if(strpos($height, '%') !== false) $height = 'height:' . $height . ';'; else $height = 'height:' . $height . 'px;'; } return $width . $height; } }