本文整理汇总了PHP中WebModule::afterInstall方法的典型用法代码示例。如果您正苦于以下问题:PHP WebModule::afterInstall方法的具体用法?PHP WebModule::afterInstall怎么用?PHP WebModule::afterInstall使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebModule
的用法示例。
在下文中一共展示了WebModule::afterInstall方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: afterInstall
public function afterInstall()
{
Yii::app()->settings->set('news', SettingsNewsForm::defaultSettings());
Yii::app()->database->import($this->id);
Yii::app()->widgets->set('module', array('alias_wgt' => 'mod.news.blocks.latast.NewsLatastBlock', 'name' => 'Новости'));
return parent::afterInstall();
}
示例2: afterInstall
public function afterInstall()
{
if (Yii::app()->hasModule('shop')) {
return parent::afterInstall();
} else {
Yii::app()->controller->addFlashMessage('Ошибка, Модуль интернет-магазин не устрановлен.');
return false;
}
}
示例3: afterInstall
public function afterInstall()
{
if (Yii::app()->hasModule('shop')) {
Yii::app()->settings->set('yandexMarket', array('name' => 'Демо магазин', 'company' => 'Демо кампания', 'url' => 'http://demo-company.loc/', 'currency_id' => 3));
return parent::afterInstall();
} else {
Yii::app()->controller->addFlashMessage('Ошибка, Модуль интернет-магазин не устрановлен.');
return false;
}
}
示例4: afterUninstall
public function afterUninstall()
{
Yii::app()->settings->clear($this->id);
//Yii::app()->unintallComponent('cart');
$db = Yii::app()->db;
$tablesArray = array(Order::model()->tableName(), OrderHistory::model()->tableName(), OrderProduct::model()->tableName(), OrderStatus::model()->tableName(), OrderProductHistroy::model()->tableName(), ShopPaymentMethod::model()->tableName(), ShopPaymentMethodTranslate::model()->tableName(), ShopDeliveryMethod::model()->tableName(), ShopDeliveryMethodTranslate::model()->tableName(), ShopDeliveryPayment::model()->tableName(), ProductNotifications::model()->tableName());
foreach ($tablesArray as $table) {
$db->createCommand()->dropTable($table);
}
return parent::afterInstall();
}
示例5: afterInstall
public function afterInstall()
{
if (Yii::app()->hasModule('shop')) {
Yii::app()->settings->set('exchange1c', array('ip' => '127.0.0.1', 'password' => sha1(microtime())));
Yii::app()->database->import($this->id);
return parent::afterInstall();
} else {
Yii::app()->controller->addFlashMessage('Ошибка, Модуль интернет-магазин не устрановлен.');
return false;
}
}
示例6: afterInstall
public function afterInstall()
{
Yii::app()->settings->set('shop', SettingsShopForm::defaultSettings());
Yii::app()->database->import($this->id);
Yii::app()->widgets->set('system', array('alias_wgt' => 'mod.shop.blocks.popular.PopularBlock', 'name' => 'Поп товары'));
Yii::app()->widgets->set('module', array('alias_wgt' => 'mod.shop.blocks.search.SearchWidget', 'name' => 'Поиск товаров'));
CFileHelper::createDirectory(Yii::getPathOfAlias('webroot.uploads.product'), 0777);
CFileHelper::createDirectory(Yii::getPathOfAlias('webroot.uploads.manufacturer'), 0777);
CFileHelper::createDirectory(Yii::getPathOfAlias('webroot.uploads.categories'), 0777);
Yii::app()->intallComponent('currency', 'mod.shop.components.CurrencyManager');
return parent::afterInstall();
}
示例7: afterInstall
public function afterInstall()
{
Yii::app()->settings->set($this->id, SettingsCommentForm::defaultSettings());
Yii::app()->database->import($this->id);
return parent::afterInstall();
}
示例8: afterInstall
public function afterInstall()
{
Yii::app()->database->import($this->id);
Yii::app()->widgets->set('module', array('alias_wgt' => 'mod.delivery.widgets.subscribe.SubscribeWidget', 'name' => 'Подписатся на рассылку'));
return parent::afterInstall();
}
示例9: afterInstall
public function afterInstall()
{
Yii::app()->database->import($this->id);
return parent::afterInstall();
}
示例10: afterInstall
public function afterInstall()
{
Yii::app()->settings->set('stats', array('param' => 'param'));
Yii::app()->database->import($this->id);
return parent::afterInstall();
}
示例11: afterInstall
public function afterInstall()
{
return parent::afterInstall();
}