当前位置: 首页>>代码示例>>PHP>>正文


PHP eZINI::getSiteAccessIni方法代码示例

本文整理汇总了PHP中eZINI::getSiteAccessIni方法的典型用法代码示例。如果您正苦于以下问题:PHP eZINI::getSiteAccessIni方法的具体用法?PHP eZINI::getSiteAccessIni怎么用?PHP eZINI::getSiteAccessIni使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在eZINI的用法示例。


在下文中一共展示了eZINI::getSiteAccessIni方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: elseif

        $aliases = eZINI::instance('image.ini')->variable('AliasSettings', 'AliasList');
    } elseif ($imageAliases != false) {
        // Provided image alias settings
        $aliases = $imageAliases;
    }
} else {
    if (!$imageAliases) {
        // Load default related siteaccess image alias settings
        $relatedSiteAccesses = eZINI::instance('site.ini')->variable('SiteAccessSettings', 'RelatedSiteAccessList');
        if (is_array($relatedSiteAccesses)) {
            foreach ($relatedSiteAccesses as $relatedSiteAccess) {
                // Optional debug output
                if ($troubleshoot && $scriptVerboseLevel >= 3) {
                    $cli->output('Fetching related siteaccess ' . "'" . $relatedSiteAccess . "'" . ' image.ini:[AliasSettings] AliasList[] image aliases defined');
                }
                $siteaccessAliases = eZINI::getSiteAccessIni($relatedSiteAccess, 'image.ini')->variable('AliasSettings', 'AliasList');
                // Default related siteaccess image alias settings
                if ($siteaccessAliases != false) {
                    // Add siteaccess defined image aliases into array
                    foreach ($siteaccessAliases as $siteaccessAlias) {
                        if (!in_array($siteaccessAlias, $aliases)) {
                            $aliases[] = $siteaccessAlias;
                        }
                    }
                    // Add default siteacess settings aliases into array
                    foreach (eZINI::instance('image.ini', 'settings', null, null, false, true)->variable('AliasSettings', 'AliasList') as $defaultSettingAlias) {
                        if (!in_array($defaultSettingAlias, $aliases)) {
                            $aliases[] = $defaultSettingAlias;
                        }
                    }
                    // Optional debug output
开发者ID:philandteds,项目名称:bcimagealias,代码行数:31,代码来源:bcimagealias.php

示例2: getMappingSiteAccess

    /**
     * @param string $siteAccess
     * @return array
     */
    public static function getMappingSiteAccess($siteAccess = null)
    {
        if(!$siteAccess)
            $siteAccessList = eZSiteAccess::siteAccessList();
        else
            $siteAccessList = array($siteAccess);

        $ClusterSiteAccess = array();
        foreach($siteAccessList as $siteAccess)
        {
            $activeExtensions = eZINI::getSiteAccessIni($siteAccess["name"], "site.ini")->variable("ExtensionSettings", "ActiveAccessExtensions");
            foreach($activeExtensions as $extension)
            {
                if(strpos($extension, 'cluster', 0) === 0)
                {
                    $cluster = $extension;
                    break;
                }
            }

            if($cluster)
                $ClusterSiteAccess[$cluster] = $siteAccess["name"];
        }

        return $ClusterSiteAccess;
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:30,代码来源:clusterTool.php

示例3: createByAttribute

 /**
  * Create image alias variation by contentObjectAttribute
  *
  * @param object $contentObjectAttribute object of class eZContentObjectAtribute
  * @param array $class Array of object class identifiers to create aliases for only these classes. Optional. Defaults to false
  * @param array $attributes Array of object image attribute identifiers to create aliases. Optional. Defaults to false
  * @param array $aliases Array of object image attribute image aliases to create. Optional. Defaults to false
  *
  * @return bool true if any image alias generation is called, false if not
  * @static
  */
 static function createByAttribute($contentObjectAttribute = false, $classes = false, $attributes = false, $aliases = false)
 {
     if (!$contentObjectAttribute) {
         return false;
     }
     // Test that content object class attribute identifier matches provided classes
     if ($classes != false && is_array($classes) && !in_array($contentObjectAttribute->attribute('object')->attribute('class_identifier'), $classes)) {
         return false;
     }
     // Test that content object class attribute identifier matches provided classes
     if ($attributes != false && is_array($attributes) && !in_array($contentObjectAttribute->attribute('contentclass_attribute_identifier'), $attributes)) {
         return false;
     }
     $results = array();
     $result = array();
     $createAliases = array();
     $executionOptions = self::executionOptions();
     // Default image alias settings
     $relatedSiteAccesses = eZINI::instance('site.ini')->variable('SiteAccessSettings', 'RelatedSiteAccessList');
     // Fetch aliases for current siteaccess
     if ($executionOptions['current-siteaccess']) {
         if (!$aliases) {
             // Default image alias settings
             $createAliases = eZINI::instance('image.ini')->variable('AliasSettings', 'AliasList');
         } else {
             // Parameter image alias to create
             $createAliases = $aliases;
         }
     } else {
         if (!$aliases) {
             // Fetch aliases for current siteaccess relateded siteaccesses
             if (is_array($relatedSiteAccesses)) {
                 foreach ($relatedSiteAccesses as $relatedSiteAccess) {
                     $relatedSiteaccessImageINIOverrideFile = 'settings/siteaccess/' . $relatedSiteAccess . '/image.ini.append.php';
                     if (file_exists($relatedSiteaccessImageINIOverrideFile)) {
                         // Optional debug output
                         if ($executionOptions['troubleshoot']) {
                             self::displayMessage('Fetching related siteaccess ' . "'" . $relatedSiteAccess . "'" . ' image.ini:[AliasSettings] AliasList[] image aliases defined', "\n");
                         }
                         $siteaccessAliases = eZINI::getSiteAccessIni($relatedSiteAccess, 'image.ini')->variable('AliasSettings', 'AliasList');
                         // Test for siteaccesses
                         if ($siteaccessAliases != false) {
                             // Add siteaccess aliases into array
                             foreach ($siteaccessAliases as $siteaccessAlias) {
                                 if (!in_array($siteaccessAlias, $aliases)) {
                                     $aliases[] = $siteaccessAlias;
                                 }
                             }
                             // Add default settings aliases into array
                             foreach (eZINI::instance('image.ini', 'settings', null, null, false, true)->variable('AliasSettings', 'AliasList') as $defaultSettingAlias) {
                                 if (!in_array($defaultSettingAlias, $aliases)) {
                                     $aliases[] = $defaultSettingAlias;
                                 }
                             }
                             // Optional debug output
                             if ($executionOptions['troubleshoot'] && $executionOptions['verboseLevel'] >= 2 && !$executionOptions['iterate']) {
                                 self::displayMessage('All siteaccess ' . "'" . $relatedSiteAccess . "'" . ' image.ini:[AliasSettings] AliasList[] image aliases defined');
                                 print_r($aliases);
                                 self::displayMessage('', "\n");
                             }
                         }
                     }
                 }
             }
         } else {
             // Parameter image alias to create
             $createAliases = $aliases;
         }
     }
     // Optional debug output
     if ($executionOptions['troubleshoot'] && $executionOptions['verboseLevel'] >= 2) {
         self::displayMessage('All related siteaccess image.ini:[AliasSettings] AliasList[] image aliases defined:');
         print_r($createAliases);
         self::displayMessage('', "\n");
     }
     // Don't try to create original image alias
     unset($createAliases['original']);
     // Default datatypes to create image alias variations
     $imageDataTypeStrings = eZINI::instance('bcimagealias.ini')->variable('BCImageAliasSettings', 'ImageDataTypeStringList');
     // Check that content object attribute data type string matches allowed datatype settings
     if (!in_array($contentObjectAttribute->attribute('data_type_string'), $imageDataTypeStrings) || !$contentObjectAttribute->attribute('has_content')) {
         return false;
     }
     // Fetch content object attribute content the image alias handler object
     $imageHandler = $contentObjectAttribute->content();
     // Fetch eZImageManager instance
     $imageManager = eZImageManager::factory();
     // Fetch all related siteaccess image.ini:[AliasSettings] AliasList[] image aliases defined
     if (is_array($relatedSiteAccesses) && !$executionOptions['current-siteaccess'] && !$executionOptions['iterate']) {
//.........这里部分代码省略.........
开发者ID:philandteds,项目名称:bcimagealias,代码行数:101,代码来源:bcimagealias.php


注:本文中的eZINI::getSiteAccessIni方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。