RegisterService('ModelReflection', $oModelReflection ?? new ModelReflectionRuntime()); } final public static function GetInstance(ModelReflection $oModelReflection = null): FormBlockService { if (!isset(static::$oInstance)) { static::$oInstance = new FormBlockService($oModelReflection); } return static::$oInstance; } /** * @param string $sId name of the form to retrieve * @param string $sType * * @return \Combodo\iTop\Forms\Block\Base\FormBlock * @throws \Combodo\iTop\Forms\Block\FormBlockException * @throws \Combodo\iTop\PropertyType\Compiler\PropertyTypeCompilerException * @throws \Combodo\iTop\PropertyType\PropertyTypeException * @throws \DOMFormatException */ public function GetFormBlockById(string $sId, string $sType): FormBlock { return PropertyTypeService::GetInstance()->GetFormBlockById($sId, $sType); } }