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


PHP Package::install方法代码示例

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


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

示例1: install

 public function install()
 {
     $pkg = parent::install();
     Loader::model('single_page');
     Loader::model('job');
     // install job
     $jb = Job::installByPackage('generate_multilingual_sitemap', $pkg);
     $p = SinglePage::add('/dashboard/multilingual', $pkg);
     if (is_object($p)) {
         $p->update(array('cName' => t('Multilingual'), 'cDescription' => t('Translate your site.')));
     }
     $p1 = SinglePage::add('/dashboard/multilingual/setup', $pkg);
     if (is_object($p1)) {
         $p1->update(array('cName' => t('Setup'), 'cDescription' => ''));
     }
     $p2 = SinglePage::add('/dashboard/multilingual/page_report', $pkg);
     if (is_object($p2)) {
         $p2->update(array('cName' => t('Page Report'), 'cDescription' => ''));
     }
     BlockType::installBlockTypeFromPackage('switch_language', $pkg);
     $ak = CollectionAttributeKey::getByHandle('multilingual_exclude_from_copy');
     if (!is_object($ak)) {
         CollectionAttributeKey::add('BOOLEAN', array('akHandle' => 'multilingual_exclude_from_copy', 'akName' => t('Exclude from Internationalization Copy'), 'akIsSearchable' => true), $pkg);
     }
 }
开发者ID:Zyqsempai,项目名称:amanet,代码行数:25,代码来源:controller.php

示例2: install

 public function install()
 {
     $pkg = parent::install();
     $cat = PermissionKeyCategory::getByHandle('page');
     $type = PermissionAccessEntityType::add('parent_page_owner', 'Parent Page Owner', $pkg);
     $cat->associateAccessEntityType($type);
 }
开发者ID:r-bansal,项目名称:janeswalk-web-1,代码行数:7,代码来源:controller.php

示例3: install

 public function install()
 {
     $pkg = parent::install();
     Loader::model('single_page');
     $main = SinglePage::add('/dashboard/multisite', $pkg);
     $mainSites = SinglePage::add('/dashboard/multisite/sites', $pkg);
 }
开发者ID:rmxdave,项目名称:multisite,代码行数:7,代码来源:controller.php

示例4: install

 public function install()
 {
     $this->precheck();
     $this->load_required_models();
     $pkg = parent::install();
     $cp = SinglePage::add('/dashboard/problog/site_importer/', $pkg);
     $cp->update(array('cName' => t('ProBlog Importer'), 'cDescription' => t('Import XML Blog Data')));
 }
开发者ID:pranastae,项目名称:problog_importer,代码行数:8,代码来源:controller.php

示例5: install

 public function install()
 {
     $pkg = parent::install();
     $setless_fs = FileSet::getByName('Setless');
     if (empty($setless_fs)) {
         $setless_fs = FileSet::createAndGetSet('Setless', 1);
     }
 }
开发者ID:bluefractals,项目名称:mr_setless_files,代码行数:8,代码来源:controller.php

示例6: install

 public function install()
 {
     $pkg = parent::install();
     //Install dashboard page
     Loader::model('single_page');
     $newC = SinglePage::add('/dashboard/cobble', $pkg);
     $newC->update(array('cDescription' => 'A Diagnostic Tool for Concrete 5 '));
 }
开发者ID:Remo,项目名称:cobble,代码行数:8,代码来源:controller.php

示例7: install

 /**
  * Install package
  */
 public function install()
 {
     $pkg = parent::install();
     mkdir(DIR_CONFIG_SITE . '/pubkeys');
     Loader::model('single_page');
     $d = SinglePage::add('/pubkey', $pkg);
     $d->update(array('cFilename' => "/pubkey.php"));
 }
开发者ID:jasny,项目名称:php-pubkey,代码行数:11,代码来源:controller.php

示例8: install

 public function install()
 {
     $pkg = parent::install();
     // Add the dashboard pages
     $mainPage = SinglePage::add('/dashboard/lgt_events', $pkg);
     $listPage = SinglePage::add('/dashboard/lgt_events/list', $pkg);
     $addPage = SinglePage::add('/dashboard/lgt_events/add', $pkg);
 }
开发者ID:robmorris180,项目名称:lgt_events,代码行数:8,代码来源:controller.php

示例9: install

 public function install()
 {
     $pkg = parent::install();
     $pkgh = Package::getByHandle('page_selector_attribute');
     Loader::model('attribute/categories/collection');
     $col = AttributeKeyCategory::getByHandle('collection');
     $pageselector = AttributeType::add('page_selector', t('Page Selector'), $pkgh);
     $col->associateAttributeKeyType(AttributeType::getByHandle('page_selector'));
 }
开发者ID:WillemAnchor,项目名称:page_selector_attribute,代码行数:9,代码来源:controller.php

示例10: install

 public function install()
 {
     $pkg = parent::install();
     //load all the stuff we need and define essentials
     Loader::model('single_page');
     // dashboard
     $p1 = SinglePage::add('/dashboard/wp_theme_importer/', $pkg);
     $p1->update(array('cName' => t("Worpress Theme Importer"), 'cDescription' => t("Concrete-ize Wordpress themes.")));
 }
开发者ID:notzen,项目名称:Concrete5-Wordpress-Theme-Importer,代码行数:9,代码来源:controller.php

示例11: install

 public function install()
 {
     $pkg = parent::install();
     //Install block
     BlockType::installBlockTypeFromPackage('custom_contact_form', $pkg);
     //Install dashboard page
     Loader::model('single_page');
     $p = SinglePage::add('/dashboard/reports/custom_contact_form', $pkg);
     $p->update(array('cName' => t('Contact Form Submissions')));
     $p->setAttribute('icon_dashboard', 'icon-list-alt');
 }
开发者ID:felixb101,项目名称:c5_custom_contact_form,代码行数:11,代码来源:controller.php

示例12: install

 public function install()
 {
     $pkg = parent::install();
     //this will automatically install our package-level db.xml schema for us (among other things)
     $this->seedData($pkg, 'body_types.sql');
     $this->seedData($pkg, 'colors.sql');
     $this->seedData($pkg, 'manufacturers.sql');
     $this->seedData($pkg, 'cars.sql');
     $this->seedData($pkg, 'car_colors.sql');
     $this->installOrUpgrade($pkg);
 }
开发者ID:jbh,项目名称:c5_boilerplate_crud,代码行数:11,代码来源:controller.php

示例13: install

 public function install()
 {
     $pkg = parent::install();
     $bt = BlockType::getByHandle('redirect');
     if (!is_object($bt)) {
         $bt = BlockType::installBlockType('redirect', $pkg);
     }
     $bts = \BlockTypeSet::getByHandle('navigation');
     if ($bts) {
         if (!$bts->contains($bt)) {
             $bts->addBlockType($bt);
         }
     }
 }
开发者ID:mlocati,项目名称:concrete5_addon_redirect,代码行数:14,代码来源:controller.php

示例14: install

 public function install()
 {
     $pkg = parent::install();
     Loader::model('single_page');
     Loader::model('attribute/categories/collection');
     // install attributes
     $cab1 = CollectionAttributeKey::add('BOOLEAN', array('akHandle' => 'easynews_section', 'akName' => t('NEWS Section'), 'akIsSearchable' => true), $pkg);
     //install pages
     $def = SinglePage::add('/dashboard/easy_news', $pkg);
     $def->update(array('cName' => 'Easy News', 'cDescription' => t('Manage site news.')));
     $def = SinglePage::add('/dashboard/easy_news/help', $pkg);
     $def->update(array('cName' => 'Easy News Help', 'cDescription' => t('Easy News help.')));
     //install block
     BlockType::installBlockTypeFromPackage('easynews_list', $pkg);
 }
开发者ID:hanicker,项目名称:Concrete5-EasyNews,代码行数:15,代码来源:controller.php

示例15: install

 public function install()
 {
     $pkg = parent::install();
     // Add social single page
     SinglePage::add('social', $pkg);
     // Add dashboard pages.
     $d = SinglePage::add('dashboard/social', $pkg);
     $d->update(array('cName' => t('Social'), 'cDescription' => t('Configure social networks.')));
     SinglePage::add('dashboard/social/facebook', $pkg);
     SinglePage::add('dashboard/social/linkedin', $pkg);
     SinglePage::add('dashboard/social/twitter', $pkg);
     SinglePage::add('dashboard/social/google', $pkg);
     // Add social network attribute keys.
     $this->add_user_attribute_key('facebook_id', 'Facebook ID');
     $this->add_user_attribute_key('linkedin_id', 'LinkedIn ID');
     $this->add_user_attribute_key('twitter_id', 'Twitter ID');
     $this->add_user_attribute_key('google_id', 'Google ID');
     // Basic fields for profile information.
     $this->add_user_attribute_key('first_name', 'First Name');
     $this->add_user_attribute_key('last_name', 'Last Name');
 }
开发者ID:remo,项目名称:social,代码行数:21,代码来源:controller.php


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