/** * Constructor. * * @return void */ public function __construct() { parent::__construct(); // Make sure we have root directory for media files $this->rootPath = JPATH_ROOT . '/images'; if (!JFolder::exists($this->rootPath) and !JFolder::create($this->rootPath)) { $this->rootPath = JPATH_ROOT . '/media'; } $this->rootPath = realpath($this->rootPath); }
/** * Field constructor * * @param JForm $form Form object */ public function __construct($form = null) { // Call parent constructor parent::__construct($form); JSNTplMMLoader::register(JSN_PATH_TPLFRAMEWORK_MEGAMENU_LIBRARIES . '/helpers', 'JSNTplMMHelper'); JSNTplMMLoader::register(JSN_PATH_TPLFRAMEWORK_MEGAMENU_LIBRARIES . '/helpers/html', 'JSNTplHelperHtml'); $this->app = JFactory::getApplication(); $this->objJSNTplMMElement = new JSNTplMMElement(); $this->objJSNTplMMElement->init(); }