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


PHP eZPackage::packageHandler方法代碼示例

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


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

示例1: finalize

 function finalize(&$package, $http, &$persistentData)
 {
     $this->createPackage($package, $http, $persistentData, $cleanupFiles);
     $classHandler = eZPackage::packageHandler('ezcontentclass');
     $classList = $persistentData['classlist'];
     foreach ($classList as $classID) {
         $classHandler->addClass($package, $classID);
     }
     $package->setAttribute('is_active', true);
     $package->store();
 }
開發者ID:mugoweb,項目名稱:ezpublish-legacy,代碼行數:11,代碼來源:ezcontentclasspackagecreator.php

示例2: finalize

 function finalize(&$package, $http, &$persistentData)
 {
     $this->createPackage($package, $http, $persistentData, $cleanupFiles, false);
     $extensionHandler = eZPackage::packageHandler('ezextension');
     $extensionList = $persistentData['extensionlist'];
     foreach ($extensionList as $extensionName) {
         $extensionHandler->addExtension($package, $extensionName);
     }
     $package->setAttribute('is_active', true);
     $package->store();
 }
開發者ID:jordanmanning,項目名稱:ezpublish,代碼行數:11,代碼來源:ezextensionpackagecreator.php

示例3: elseif

    {
        // If this is an unhandled error, we are skipping this item
        $currentItem++;
    }
    $doItemInstall = true;
}
elseif ( $module->isCurrentAction( 'UninstallPackage' ) )
{
    $doItemInstall = true;
}
else
{
    $uninstallElements = array();
    foreach ( $uninstallItems as $uninstallItem )
    {
        $handler = eZPackage::packageHandler( $uninstallItem['type'] );
        if ( $handler )
        {
            $uninstallElement = $handler->explainInstallItem( $package, $uninstallItem );

            if ( $uninstallElement )
            {
                if ( isset( $uninstallElement[0] ) )
                    $uninstallElements = array_merge( $uninstallElements, $uninstallElement );
                else
                    $uninstallElements[] = $uninstallElement;
            }
        }
    }

    $templateName = "design:package/uninstall.tpl";
開發者ID:nottavi,項目名稱:ezpublish,代碼行數:31,代碼來源:uninstall.php

示例4: languageInfo

 function languageInfo($withLanguageNames = false)
 {
     $langaugeInfo = array();
     $classHandler = eZPackage::packageHandler('ezcontentclass');
     $objectHandler = eZPackage::packageHandler('ezcontentobject');
     $explainClassInfo = array('language_info');
     $packageItems = $this->installItemsList();
     foreach ($packageItems as $item) {
         $itemLanguageInfo = array();
         if ($item['type'] == 'ezcontentclass') {
             $classInfo = $classHandler->explainInstallItem($this, $item, $explainClassInfo);
             $itemLanguageInfo = isset($classInfo['language_info']) ? $classInfo['language_info'] : array();
         } else {
             if ($item['type'] == 'ezcontentobject') {
                 $objectsInfo = $objectHandler->explainInstallItem($this, $item);
                 // merge objects info
                 foreach ($objectsInfo as $objectInfo) {
                     $objectLanguages = isset($objectInfo['language_info']) ? $objectInfo['language_info'] : array();
                     foreach ($objectLanguages as $objectLanguage) {
                         if (!in_array($objectLanguage, $itemLanguageInfo)) {
                             $itemLanguageInfo[] = $objectLanguage;
                         }
                     }
                 }
             }
         }
         // merge class and objects infos
         foreach ($itemLanguageInfo as $languageLocale) {
             if (!in_array($languageLocale, $langaugeInfo)) {
                 $langaugeInfo[] = $languageLocale;
             }
         }
     }
     if ($withLanguageNames) {
         $langaugeInfoWithNames = array();
         foreach ($langaugeInfo as $languageLocale) {
             $language = eZContentLanguage::fetchByLocale($languageLocale);
             $languageName = $language->attribute('name');
             $langaugeInfoWithNames[$languageLocale] = $languageName;
         }
         $langaugeInfo = $langaugeInfoWithNames;
     }
     return $langaugeInfo;
 }
開發者ID:jordanmanning,項目名稱:ezpublish,代碼行數:44,代碼來源:ezpackage.php


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