set the ID of the control upon load if it exists

This commit is contained in:
Michael Becker 2023-11-11 20:31:41 -05:00
parent e52ca1d691
commit af9d056d19

View File

@ -182,7 +182,7 @@
* @param MarkupElement $elem The MarkupElement to parse.
* @param WebControl $parent The WebControl that owns this control.
*/
public static function LoadControl($elem, $parent)
public static function LoadControl(MarkupElement $elem, $parent)
{
if (get_class($elem) == "UniversalEditor\\ObjectModels\\Markup\\MarkupTagElement")
{
@ -204,6 +204,12 @@
if (class_exists($realname))
{
$obj = new $realname();
$id = $elem->GetAttributeValue("id");
if ($id !== null)
{
$obj->ID = $id;
}
}
else
{