当前位置: 首页>>代码示例>>PHP>>正文


PHP Tab::add方法代码示例

本文整理汇总了PHP中Tab::add方法的典型用法代码示例。如果您正苦于以下问题:PHP Tab::add方法的具体用法?PHP Tab::add怎么用?PHP Tab::add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tab的用法示例。


在下文中一共展示了Tab::add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: install

 public function install()
 {
     // Install SQL
     include dirname(__FILE__) . '/sql/install.php';
     foreach ($sql as $s) {
         if (!Db::getInstance()->execute($s)) {
             return false;
         }
     }
     // Install Tabs
     if (!(int) Tab::getIdFromClassName('AdminPosMenu')) {
         $parent_tab = new Tab();
         // Need a foreach for the language
         $parent_tab->name[$this->context->language->id] = $this->l('PosExtentions');
         $parent_tab->class_name = 'AdminPosMenu';
         $parent_tab->id_parent = 0;
         // Home tab
         $parent_tab->module = $this->name;
         $parent_tab->add();
     }
     $tab = new Tab();
     // Need a foreach for the language
     foreach (Language::getLanguages() as $language) {
         $tab->name[$language['id_lang']] = $this->l('Manage Staticblocks');
     }
     $tab->class_name = 'AdminPosstaticblocks';
     $tab->id_parent = (int) Tab::getIdFromClassName('AdminPosMenu');
     $tab->module = $this->name;
     $tab->add();
     // Set some defaults
     return parent::install() && $this->registerHook('top') && $this->registerHook('brandSlider') && $this->registerHook('bannerSlide') && $this->registerHook('blockPosition1') && $this->registerHook('blockPosition2') && $this->registerHook('blockPosition3') && $this->registerHook('blockPosition4') && $this->registerHook('blockPosition5') && $this->registerHook('blockPosition6') && $this->registerHook('bannerTabcate') && $this->registerHook('blockDetailProduct') && $this->registerHook('leftColumn') && $this->registerHook('rightColumn') && $this->registerHook('home') && $this->registerHook('footer') && $this->registerHook('displayHeader') && $this->registerHook('displayBackOfficeHeader');
 }
开发者ID:IngenioContenidoDigital,项目名称:serta,代码行数:32,代码来源:posstaticblocks.php

示例2: install

 public function install()
 {
     // Prepare tab
     $tab = new Tab();
     $tab->active = 1;
     $tab->class_name = "AdminBlockCategories";
     $tab->name = array();
     foreach (Language::getLanguages(true) as $lang) {
         $tab->name[$lang['id_lang']] = 'BlockCategories';
     }
     $tab->id_parent = -1;
     $tab->module = $this->name;
     if (!$tab->add() || !parent::install() || !$this->registerHook('footer') || !$this->registerHook('header') || !$this->registerHook('categoryAddition') || !$this->registerHook('categoryUpdate') || !$this->registerHook('categoryDeletion') || !$this->registerHook('actionAdminMetaControllerUpdate_optionsBefore') || !$this->registerHook('actionAdminLanguagesControllerStatusBefore') || !$this->registerHook('displayBackOfficeCategory') || !Configuration::updateValue('BLOCK_CATEG_MAX_DEPTH', 4) || !Configuration::updateValue('BLOCK_CATEG_DHTML', 1) || !Configuration::updateValue('BLOCK_CATEG_ROOT_CATEGORY', 1)) {
         return false;
     }
     // Hook the module either on the left or right column
     $theme = new Theme(Context::getContext()->shop->id_theme);
     if ((!$theme->default_left_column || !$this->registerHook('leftColumn')) && (!$theme->default_right_column || !$this->registerHook('rightColumn'))) {
         // If there are no colums implemented by the template, throw an error and uninstall the module
         $this->_errors[] = $this->l('This module need to be hooked in a column and your theme does not implement one');
         parent::uninstall();
         return false;
     }
     return true;
 }
开发者ID:gks-stage,项目名称:prestashop,代码行数:25,代码来源:blockcategories.php

示例3: install

 /**
  * @return boolean
  */
 public function install()
 {
     if (Shop::isFeatureActive()) {
         Shop::setContext(Shop::CONTEXT_ALL);
     }
     // Install invisible tab
     $tab = new Tab();
     $tab->name[$this->context->language->id] = $this->l('SecurionPay');
     $tab->class_name = 'AdminSecurionPay';
     $tab->id_parent = -1;
     // No parent tab
     $tab->module = $this->name;
     $tab->add();
     //Init
     Configuration::updateValue('SECURIONPAY_CONF', '');
     if (!parent::install()) {
         return false;
     }
     if (!Configuration::updateValue(self::MODE, self::MODE_TEST)) {
         return false;
     }
     if (!$this->registerHook('payment') || !$this->registerHook('displayAdminOrder')) {
         return false;
     }
     return true;
 }
开发者ID:securionpay,项目名称:securionpay-prestashop,代码行数:29,代码来源:SecurionPay.php

示例4: install

 public function install()
 {
     // Install SQL
     include dirname(__FILE__) . '/sql/install.php';
     foreach ($sql as $s) {
         if (!Db::getInstance()->execute($s)) {
             return false;
         }
     }
     // Install Tabs
     if (!(int) Tab::getIdFromClassName('AdminPosMenu')) {
         $parent_tab = new Tab();
         // Need a foreach for the language
         $parent_tab->name[$this->context->language->id] = $this->l('PosExtentions');
         $parent_tab->class_name = 'AdminPosMenu';
         $parent_tab->id_parent = 0;
         // Home tab
         $parent_tab->module = $this->name;
         $parent_tab->add();
     }
     $tab = new Tab();
     // Need a foreach for the language
     foreach (Language::getLanguages() as $language) {
         $tab->name[$language['id_lang']] = $this->l('Manage Static Footer');
     }
     $tab->class_name = 'AdminPosstaticfooter';
     $tab->id_parent = (int) Tab::getIdFromClassName('AdminPosMenu');
     $tab->module = $this->name;
     $tab->add();
     // Set some defaults
     return parent::install() && $this->registerHook('footer') && $this->_installHookCustomer() && $this->registerHook('blockFooter1') && $this->registerHook('blockFooter2') && $this->registerHook('blockFooter3') && $this->registerHook('displayBackOfficeHeader');
 }
开发者ID:OaSiis,项目名称:LDDP,代码行数:32,代码来源:posstaticfooter.php

示例5: install

 public function install()
 {
     Configuration::updateValue('PS_DASHGOALS_CURRENT_YEAR', date('Y'));
     for ($month = '01'; $month <= 12; $month = sprintf('%02d', $month + 1)) {
         $key = Tools::strtoupper('dashgoals_traffic_' . $month . '_' . date('Y'));
         if (!ConfigurationKPI::get($key)) {
             ConfigurationKPI::updateValue($key, 600);
         }
         $key = Tools::strtoupper('dashgoals_conversion_' . $month . '_' . date('Y'));
         if (!ConfigurationKPI::get($key)) {
             ConfigurationKPI::updateValue($key, 2);
         }
         $key = Tools::strtoupper('dashgoals_avg_cart_value_' . $month . '_' . date('Y'));
         if (!ConfigurationKPI::get($key)) {
             ConfigurationKPI::updateValue($key, 80);
         }
     }
     // Prepare tab
     $tab = new Tab();
     $tab->active = 1;
     $tab->class_name = 'AdminDashgoals';
     $tab->name = array();
     foreach (Language::getLanguages(true) as $lang) {
         $tab->name[$lang['id_lang']] = 'Dashgoals';
     }
     $tab->id_parent = -1;
     $tab->module = $this->name;
     return $tab->add() && parent::install() && $this->registerHook('dashboardZoneTwo') && $this->registerHook('dashboardData') && $this->registerHook('actionAdminControllerSetMedia');
 }
开发者ID:informaticapb,项目名称:Prestashop,代码行数:29,代码来源:dashgoals.php

示例6: install

 /**
  * @see Module::install()
  */
 public function install()
 {
     // Prepare tab
     $tab = new Tab();
     $tab->active = 1;
     $tab->class_name = 'AdminLeoSliderLayer';
     $tab->name = array();
     foreach (Language::getLanguages(true) as $lang) {
         $tab->name[$lang['id_lang']] = 'LeoSliderLayer';
     }
     $tab->id_parent = -1;
     $tab->module = $this->name;
     /* Adds Module */
     if ($tab->add() && parent::install() && Configuration::updateValue('LEOSLIDERLAYER_GROUP_DE', '1')) {
         $res = true;
         $res &= $this->registerHook('header');
         $res &= $this->registerHook('actionShopDataDuplication');
         foreach ($this->_hookSupport as $value) {
             $res &= $this->registerHook($value);
         }
         /* Sets up configuration */
         /* Creates tables */
         $res &= $this->createTables();
         return (bool) $res;
     }
     return false;
 }
开发者ID:evgrishin,项目名称:mh16014,代码行数:30,代码来源:leosliderlayer.php

示例7: upgrade_module_1_0_3

function upgrade_module_1_0_3($object)
{
    $sql = array();
    $sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'simpleblog_tag` (
            `id_simpleblog_tag` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT,
            `id_lang` INT( 11 ) unsigned NOT NULL,
            `name` VARCHAR(60) NOT NULL,
            PRIMARY KEY (`id_simpleblog_tag`)
        ) ENGINE = ' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8';
    $sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'simpleblog_post_tag` (
            `id_simpleblog_post` INT( 11 ) unsigned NOT NULL,
            `id_simpleblog_tag` INT( 11 ) unsigned NOT NULL,
            PRIMARY KEY (`id_simpleblog_tag`)
        ) ENGINE = ' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8';
    foreach ($sql as $s) {
        if (!Db::getInstance()->Execute($s)) {
            return false;
        }
    }
    $context = Context::getContext();
    $tab = new Tab();
    $tab->name[$context->language->id] = $object->l('Tags');
    $tab->class_name = 'AdminSimpleBlogTags';
    $tab->id_parent = Tab::getIdFromClassName('AdminSimpleBlog');
    $tab->module = $object->name;
    $tab->add();
    return true;
}
开发者ID:evgrishin,项目名称:se1614,代码行数:28,代码来源:install-1.0.3.php

示例8: install

 public function install()
 {
     if (!parent::install() || !$this->registerHook('displayHeader') || !$this->registerHook('displayBackOfficeHeader') || !$this->installDB()) {
         return false;
     }
     if (!$this->backupAllModulesHook('hook_module', 'ovic_backup_hook_module')) {
         return false;
     }
     $result = true;
     foreach (self::$OptionHookAssign as $hookname) {
         if (!$this->registerHook($hookname)) {
             $result &= false;
             break;
         }
     }
     if (!$result || !$this->registerHook('actionModuleRegisterHookAfter') || !$this->installSampleData()) {
         return false;
     }
     //$defaultfont  = htmlentities("<link href='http://fonts.googleapis.com/css?family=Cuprum' rel='stylesheet' type='text/css'>");
     //        if (is_string($defaultfont) === true)
     //        	$defaultfont = urldecode(preg_replace('/((\%5C0+)|(\%00+))/i', '', urlencode($defaultfont)));
     //        $defaultfont = !is_string($defaultfont)? $defaultfont : stripslashes($defaultfont);
     //        Configuration::updateValue('OVIC_FONT_LINK', $defaultfont);
     //        Configuration::updateValue('OVIC_MAIN_COLOR','#fe983d');
     //        Configuration::updateValue('OVIC_BTN_COLOR','#333');
     //        Configuration::updateValue('OVIC_BTN_HOVER_COLOR','#000');
     //        Configuration::updateValue('OVIC_BTN_TEXT_COLOR','#fff');
     //        Configuration::updateValue('OVIC_BTN_TEXT_HOVER_COLOR','#fff');
     $langs = Language::getLanguages();
     $tab = new Tab();
     $tab->class_name = "AdminThemeConfig";
     foreach ($langs as $l) {
         $tab->name[$l['id_lang']] = $this->l('Ovic Theme config');
     }
     $tab->module = '';
     $tab->id_parent = 0;
     //Root tab
     $tab->save();
     $tab_id = $tab->id;
     $newtab = new Tab();
     $newtab->class_name = "AdminLayoutSetting";
     foreach ($langs as $l) {
         $newtab->name[$l['id_lang']] = $this->l('Layout Control');
     }
     $newtab->module = $this->name;
     $newtab->id_parent = $tab_id;
     $newtab->add();
     $newtab = new Tab();
     $newtab->class_name = "AdminLayoutBuilder";
     foreach ($langs as $l) {
         $newtab->name[$l['id_lang']] = $this->l('Layout Builder');
     }
     $newtab->module = $this->name;
     $newtab->id_parent = $tab_id;
     $newtab->add();
     return true;
 }
开发者ID:habypk,项目名称:zocart,代码行数:57,代码来源:oviclayoutcontrol_bak_10.3.15.php

示例9: adminInstall

 private function adminInstall($idParentTab = "7")
 {
         $tab = new Tab();
         $tab->class_name = 'AdminNewsletter';
         $tab->id_parent = $idParentTab;
         $tab->module = 'newslettertabmodule';
         $tab->name[(int)(Configuration::get('PS_LANG_DEFAULT'))] = $this->l('Newsletters');
         return $tab->add();
 }            
开发者ID:rsmaizys,项目名称:Newsletter-Tab-Module-for-PrestaShop,代码行数:9,代码来源:newslettertabmodule.php

示例10: install

 public function install()
 {
     if (!parent::install() || !$this->installDB()) {
         return false;
     }
     if (!$this->registerHook('displayHeader') || !$this->registerHook('displayBackOfficeHeader') || !$this->registerHook('displayProductListReviews')) {
         return false;
     }
     if (!$this->backupAllModulesHook('hook_module', 'ovic_backup_hook_module')) {
         return false;
     }
     $result = true;
     foreach (self::$OptionHookAssign as $hookname) {
         if (!$this->registerHook($hookname)) {
             $result &= false;
             break;
         }
     }
     if (!$result || !$this->registerHook('actionModuleRegisterHookAfter')) {
         return false;
     }
     if (!$this->installSampleData()) {
         return false;
     }
     $langs = Language::getLanguages();
     $tab = new Tab();
     $tab->class_name = "AdminThemeConfig";
     foreach ($langs as $l) {
         $tab->name[$l['id_lang']] = $this->l('Ovic Theme config');
     }
     $tab->module = '';
     $tab->id_parent = 0;
     //Root tab
     $tab->save();
     $tab_id = $tab->id;
     $newtab = new Tab();
     $newtab->class_name = "AdminLayoutSetting";
     foreach ($langs as $l) {
         $newtab->name[$l['id_lang']] = $this->l('Layout Control');
     }
     $newtab->module = $this->name;
     $newtab->id_parent = $tab_id;
     $newtab->add();
     $newtab = new Tab();
     $newtab->class_name = "AdminLayoutBuilder";
     foreach ($langs as $l) {
         $newtab->name[$l['id_lang']] = $this->l('Layout Builder');
     }
     $newtab->module = $this->name;
     $newtab->id_parent = $tab_id;
     $newtab->add();
     //Theme::getThemeInfo($this->context->shop->id_theme)
     return true;
 }
开发者ID:zangles,项目名称:lennyba,代码行数:54,代码来源:oviclayoutcontrol.php

示例11: installTab

 public function installTab()
 {
     $tab = new Tab();
     $tab->active = 1;
     $tab->class_name = 'AdminAccountBank';
     foreach (Language::getLanguages(true) as $lang) {
         $tab->name[$lang['id_lang']] = 'Account Bank';
     }
     $tab->id_parent = (int) Tab::getIdFromClassName('AdminParentOrders');
     $tab->module = $this->name;
     return $tab->add();
 }
开发者ID:lajayuhniyarsyah,项目名称:SupraOShop,代码行数:12,代码来源:accountbank.php

示例12: installTab

 public function installTab()
 {
     $tab = new Tab();
     $tab->active = 1;
     $tab->class_name = 'AdminOnboarding';
     $tab->name = array();
     foreach (Language::getLanguages(true) as $lang) {
         $tab->name[$lang['id_lang']] = 'Onboarding';
     }
     $tab->id_parent = 99999;
     $tab->module = $this->name;
     return $tab->add();
 }
开发者ID:ortegon000,项目名称:tienda,代码行数:13,代码来源:onboarding.php

示例13: installTab

 public function installTab()
 {
     $tab = new Tab();
     $tab->active = 1;
     $tab->class_name = 'AdminGetresponse';
     $tab->name = array();
     foreach (Language::getLanguages(true) as $lang) {
         $tab->name[$lang['id_lang']] = 'GetResponse';
     }
     $tab->id_parent = (int) Tab::getIdFromClassName('AdminAdmin');
     $tab->module = $this->name;
     return $tab->add();
 }
开发者ID:GetResponse,项目名称:GetResponse-PrestaShop-Integration,代码行数:13,代码来源:getresponse.php

示例14: install

 public function install()
 {
     // Install Tabs
     $parent_tab = new Tab();
     // Need a foreach for the language
     $parent_tab->name[(int) Configuration::get('PS_LANG_DEFAULT')] = $this->l('Newsletter2Go');
     $parent_tab->class_name = 'Newsletter2GoTab';
     $parent_tab->id_parent = 0;
     // Home tab
     $parent_tab->module = $this->name;
     $parent_tab->add();
     return parent::install() && $this->registerUrls() && $this->registerHook('backOfficeHeader');
 }
开发者ID:newsletter2go,项目名称:newsletter2go-prestashop-plugin,代码行数:13,代码来源:newsletter2go.php

示例15: installAdminTab

 public function installAdminTab($class_name, $parent = null, $active = true)
 {
     $tab = new Tab();
     $tab->class_name = $class_name;
     $tab->active = $active;
     $tab->name = array();
     foreach (Language::getLanguages(true) as $lang) {
         $tab->name[$lang['id_lang']] = $this->module->displayName;
     }
     $tab->id_parent = (int) Tab::getIdFromClassName($parent == null ? 'AdminParentModules' : $parent);
     $tab->module = $this->module->name;
     return $tab->add();
 }
开发者ID:Oldwo1f,项目名称:yakaboutique,代码行数:13,代码来源:psmsetup16.php


注:本文中的Tab::add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。