initAddonType(); $this->init(); $this->putHtml(); } /** * init addon types */ protected function initAddonType(){ if(empty($this->addonType)){ $this->addonType = UniteFunctionsUC::getGetVar("addontype", null, UniteFunctionsUC::SANITIZE_KEY); } $this->objAddonType = UniteCreatorAddonType::getAddonTypeObject($this->addonType); UniteCreatorAdmin::setAdminGlobalsByAddonType($this->objAddonType); } /** * get header text * @return unknown */ protected function getHeaderText(){ if(!empty($this->objAddonType->managerHeaderPrefix)) GlobalsUC::$alterViewHeaderPrefix = $this->objAddonType->managerHeaderPrefix; $headerTitle = esc_html__("Manage", "unlimited-elements-for-elementor")." ".$this->objAddonType->textPlural; return($headerTitle); } /** * validate addon type */ private function validateAddonType(){ if(empty($this->objAddonType)) UniteFunctionsUC::throwError("This view should have an addon type"); } /** * validate addon type */ private function validateManager(){ if(empty($this->objManager)) UniteFunctionsUC::throwError("The manager is not inited"); } /** * init the view, function for override */ protected function init(){ $view = UniteCreatorAdmin::getView(); $this->objManager = new UniteCreatorManagerAddons(); $this->objManager->init($this->addonType); if(!empty($this->product)) $this->objManager->addPassData("product", $this->product); if(!empty($this->headerTextInner)) $this->objManager->setHeaderLineText($this->headerTextInner); } /** * put view html */ protected function putHtml(){ $this->validateAddonType(); $this->validateManager(); if($this->showHeader == true){ $headerTitle = $this->getHeaderText(); require HelperUC::getPathTemplate("header"); }else require HelperUC::getPathTemplate("header_missing"); $pluginName = GlobalsUC::PLUGIN_NAME; ?> showButtons == true) UniteProviderFunctionsUC::putAddonViewAddHtml() ?>
objManager->outputHtml() ?>
putUpdatePluginsButton == true){ if(method_exists("UniteProviderFunctionsUC", "putUpdatePluginHtml")) UniteProviderFunctionsUC::putUpdatePluginHtml($pluginName, $this->pluginTitle); } ?>