<?php
 namespace Engine\Form\Container; class Ajax extends \Engine\Form\Container\GeneralAbstract { public $class = 'AJAXContainer'; protected $defaultContainer = null; protected $URL = ''; function __construct($label=''){ parent::__construct($label); $this->setStyle("preLoad", true); } public function getDefaultContainer(){ return $this->defaultContainer; } public function setDefaultContainer(\Engine\Form\Container\GeneralAbstract $container){ $this->defaultContainer = $container; return $this->defaultContainer;} public function getTemplateParams($templateClass = null, $parentElement = null){ $params = parent::getTemplateParams($templateClass, $parentElement); $params['defaultContainer'] = $this->getDefaultContainer(); if(!$params['defaultContainer']){ $params['defaultContainer'] = reset($this->childs); } $params['URL'] = $this->URL; return $params; } public function setURL($URL){ $this->URL = $URL; return $this; } public function getURL(){ return $this->URL; } } 