set the ID of the control upon load if it exists
This commit is contained in:
parent
e52ca1d691
commit
af9d056d19
@ -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
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user