本文整理汇总了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);
}
}
示例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);
}
示例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);
}
示例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')));
}
示例5: install
public function install()
{
$pkg = parent::install();
$setless_fs = FileSet::getByName('Setless');
if (empty($setless_fs)) {
$setless_fs = FileSet::createAndGetSet('Setless', 1);
}
}
示例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 '));
}
示例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"));
}
示例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);
}
示例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'));
}
示例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.")));
}
示例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');
}
示例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);
}
示例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);
}
}
}
示例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);
}
示例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');
}