<?php
 namespace Engine\Form; class Iframe extends \Engine\Form\General { public $class = 'iframeContent'; protected $serverMessages = []; protected $defaultContainer = null; public function sendMessage($messageArr) { $this->serverMessages[] = $messageArr; } public function getTemplateParams($templateClass = null, $parentElement = null) { $params = parent::getTemplateParams($templateClass, $parentElement); global $R; $params['baseLayout'] = ($R['__formField_renderDestination']=='iframe' ? "iframe" : "popup"); $params['baseSmartyLayout'] = ($params['baseLayout']=='iframe' ? SMARTY_LAYOUT_OLD_MAIN_IFRAME : SMARTY_LAYOUT_OLD_MAIN_POPUP); $params['serverMessages'] = $this->serverMessages; return $params; } } 