当前位置: 首页>>代码示例>>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;未经允许,请勿转载。