當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Plugin::setData方法代碼示例

本文整理匯總了PHP中Plugin::setData方法的典型用法代碼示例。如果您正苦於以下問題:PHP Plugin::setData方法的具體用法?PHP Plugin::setData怎麽用?PHP Plugin::setData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Plugin的用法示例。


在下文中一共展示了Plugin::setData方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: deactivate

 public function deactivate(Plugin $plugin)
 {
     $data = $plugin->getData();
     if ($data === null || !isset($data['idMenu'])) {
         throw new ErrorException('Плагин установлен неверно.');
     }
     $data = $this->deleteMenu($data['idMenu'], $data);
     unset($data['idMenu']);
     $plugin->setData($data);
 }
開發者ID:Cranky4,項目名稱:npfs,代碼行數:10,代碼來源:SiteMapPlugin.php

示例2: deactivate

 public function deactivate(Plugin $plugin)
 {
     $data = $plugin->getData();
     if ($data === null || !isset($data['id_site_module'])) {
         throw new ErrorException('Плагин установлен неверно.');
     }
     $data = $this->deleteSiteModule($data['id_site_module'], $data, 'site_module_place');
     unset($data['id_site_module']);
     $plugin->setData($data);
 }
開發者ID:kot-ezhva,項目名稱:ygin,代碼行數:10,代碼來源:CloudimPlugin.php

示例3: deactivate

 public function deactivate(Plugin $plugin)
 {
     $data = $plugin->getData();
     if ($data === null || !isset($data['id_site_module'])) {
         throw new ErrorException('Плагин установлен неверно.');
     }
     $data = $this->deleteSiteModule($data['id_site_module'], $data, 'site_module_place');
     Yii::app()->authManager->removeAuthItemObject('list', $data['id_object']);
     $this->updateMenu = true;
     unset($data['id_site_module']);
     $plugin->setData($data);
 }
開發者ID:kot-ezhva,項目名稱:ygin,代碼行數:12,代碼來源:VitrinePlugin.php

示例4: deactivate

 public function deactivate(Plugin $plugin)
 {
     $data = $plugin->getData();
     if ($data === null || !isset($data['id_site_module'])) {
         throw new ErrorException('Плагин установлен неверно.');
     }
     $siteModule = SiteModule::model()->findByPk($data['id_site_module']);
     $idBannerPlace = $siteModule->phpScriptInstance->getParameterValue('idBannerPlace');
     if (is_numeric($idBannerPlace) && ($bp = BannerPlace::model()->findByPk($idBannerPlace)) != null) {
         if (count($bp->banners) == 0) {
             $bp->delete();
         }
     }
     $data = $this->deleteSiteModule($data['id_site_module'], $data, 'site_module_place');
     unset($data['id_site_module']);
     $plugin->setData($data);
 }
開發者ID:kot-ezhva,項目名稱:ygin,代碼行數:17,代碼來源:SpecialOfferPlugin.php

示例5: updatePlugin

 public function updatePlugin(Plugin $plugin)
 {
     $data = $plugin->getData();
     if ($plugin->getIsEnabled()) {
         $data = array_merge($data, $this->setupEventRegister());
     }
     $plugin->setData($data);
 }
開發者ID:kot-ezhva,項目名稱:ygin,代碼行數:8,代碼來源:CabinetPlugin.php

示例6: deactivate

 public function deactivate(Plugin $plugin)
 {
     $data = $plugin->getData();
     if ($data === null || !isset($data['id_menu'])) {
         throw new ErrorException('Плагин установлен неверно.');
     }
     // Удаляем: все отправленные и неотправленные события по типу события + подписчиков + тип события
     $eventType = NotifierEventType::model()->findByPk(@$data['idEventTypeNewOffer']);
     if ($eventType != null) {
         $eventType->delete();
     }
     $data = $this->deleteMenu($data['id_menu'], $data, 'id_menu_module_template');
     $data = $this->deleteSiteModule($data['id_site_module_category'], $data, 'site_module_place_category');
     $data = $this->deleteSiteModule($data['id_site_module_cart'], $data, 'site_module_place_cart');
     $data = $this->deleteSiteModule($data['id_site_module_brand'], $data, 'site_module_place_brand');
     Yii::app()->authManager->removeAuthItemObject('list', $data['id_object_product']);
     Yii::app()->authManager->removeAuthItemObject('list', $data['id_object_category']);
     Yii::app()->authManager->removeAuthItemObject('list', $data['id_object_offer']);
     Yii::app()->authManager->removeAuthItemObject('list', $data['id_object_brand']);
     if (!isset($data['id_object_remain_status'])) {
         $data['id_object_remain_status'] = 529;
     }
     Yii::app()->authManager->removeAuthItemObject('list', $data['id_object_remain_status']);
     if (!isset($data['id_object_invoice'])) {
         $data['id_object_invoice'] = 'id_object_invoice';
     }
     Yii::app()->authManager->removeAuthItemObject('list', $data['id_object_invoice']);
     $this->updateMenu = true;
     unset($data['id_menu'], $data['id_site_module_category'], $data['id_site_module_cart'], $data['id_site_module_brand']);
     $plugin->setData($data);
 }
開發者ID:kot-ezhva,項目名稱:ygin,代碼行數:31,代碼來源:ShopPlugin.php

示例7: deactivate

 public function deactivate(Plugin $plugin)
 {
     $data = $plugin->getData();
     if ($data === null || !isset($data['id_menu'])) {
         throw new ErrorException('Плагин установлен неверно.');
     }
     $data = $this->deleteMenu($data['id_menu'], $data, 'id_menu_module_template');
     // Удаляем: все отправленные и неотправленные события по типу события + подписчиков + тип события
     $eventType = NotifierEventType::model()->findByPk($data['id_event_type']);
     if ($eventType != null) {
         $eventType->delete();
     }
     Yii::app()->authManager->removeAuthItemObject('list', $data['id_object']);
     $this->updateMenu = true;
     unset($data['id_menu'], $data['id_event_type']);
     $plugin->setData($data);
 }
開發者ID:kot-ezhva,項目名稱:ygin,代碼行數:17,代碼來源:FaqPlugin.php

示例8: updatePlugin

 public function updatePlugin(Plugin $plugin)
 {
     $data = $plugin->getData();
     if (!isset($data['id_php_script_type_widget_random_photo'])) {
         $data['id_php_script_type_widget_random_photo'] = 1045;
     }
     if ($plugin->getIsEnabled()) {
         if (isset($data['useGallery']) && $data['useGallery']) {
             $data = $this->setupRandomPhotoWidget($data);
         }
     }
     $plugin->setData($data);
 }
開發者ID:kot-ezhva,項目名稱:ygin,代碼行數:13,代碼來源:PhotogalleryPlugin.php

示例9: install

 public function install(Plugin $plugin)
 {
     $plugin->setData(array('id_object_banner_place' => 261, 'id_object_banner' => 260));
 }
開發者ID:kot-ezhva,項目名稱:ygin,代碼行數:4,代碼來源:BannerPlugin.php


注:本文中的Plugin::setData方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。