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


PHP eZDir::findSubItems方法代码示例

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


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

示例1: checkRecurrenceCondition

 function checkRecurrenceCondition($newsletter)
 {
     if (!$newsletter->attribute('recurrence_condition')) {
         return true;
     }
     if (0 < count($this->conditionExtensions)) {
         foreach ($this->conditionExtensions as $conditionExtension) {
             // TODO: Extend to ask multiple condition extensions to allow more complex checks
             $siteINI = eZINI::instance();
             $siteINI->loadCache();
             $extensionDirectory = $siteINI->variable('ExtensionSettings', 'ExtensionDirectory');
             $extensionDirectories = eZDir::findSubItems($extensionDirectory);
             $directoryList = eZExtension::expandedPathList($extensionDirectories, 'condition_handler');
             foreach ($directoryList as $directory) {
                 $handlerFile = $directory . '/' . strtolower($conditionExtension) . 'handler.php';
                 // we only check one extension for now
                 if ($conditionExtension === $newsletter->attribute('recurrence_condition') && file_exists($handlerFile)) {
                     include_once $handlerFile;
                     $className = $conditionExtension . 'Handler';
                     if (class_exists($className)) {
                         $impl = new $className();
                         // Ask if condition is fullfilled
                         return $impl->checkCondition($newsletter);
                     } else {
                         eZDebug::writeError("Class {$className} not found. Unable to verify recurrence condition. Blocked recurrence.");
                         return false;
                     }
                 }
             }
         }
     }
     // If we have a condition but no match we prevent the sendout
     eZDebug::writeError("Newsletter recurrence condition '" . $newsletter->attribute('recurrence_condition') . "' extension not found ");
     return false;
 }
开发者ID:EVE-Corp-Center,项目名称:ECC-Website,代码行数:35,代码来源:ezrecurrence.php

示例2: handleAddParameters

    function handleAddParameters( $packageType, $package, $cli, $arguments )
    {
        $arguments = array_unique( $arguments );
        $extensionsToAdd = array();

        $extensionList = eZDir::findSubItems( eZExtension::baseDirectory(), 'dl' );

        foreach ( $arguments as $argument )
        {
            if ( in_array( $argument, $extensionList ) )
            {
                $extensionsToAdd[] = $argument;
            }
            else
            {
                $cli->error( 'Extension ' . $cli->style( 'dir' ) . $argument .  $cli->style( 'dir-end' ) . ' not found.' );
                return false;
            }
        }

        return $extensionsToAdd;
    }
开发者ID:robinmuilwijk,项目名称:ezpublish,代码行数:22,代码来源:ezextensionpackagehandler.php

示例3: loadExtensionName

 function loadExtensionName($package, $http, $step, &$persistentData, $tpl)
 {
     $extensionList = eZDir::findSubItems(eZExtension::baseDirectory(), 'dl');
     $tpl->setVariable('extension_list', $extensionList);
 }
开发者ID:jordanmanning,项目名称:ezpublish,代码行数:5,代码来源:ezextensionpackagecreator.php

示例4:

<?php
/**
 * @copyright Copyright (C) 1999-2012 eZ Systems AS. All rights reserved.
 * @license http://ez.no/Resources/Software/Licenses/eZ-Business-Use-License-Agreement-eZ-BUL-Version-2.1 eZ Business Use License Agreement eZ BUL Version 2.1
 * @version 4.7.0
 * @package kernel
 */

$http = eZHTTPTool::instance();
$module = $Params['Module'];


$tpl = eZTemplate::factory();

$extensionDir = eZExtension::baseDirectory();
$availableExtensionArray = eZDir::findSubItems( $extensionDir, 'dl' );

// open site.ini for reading
$siteINI = eZINI::instance();
$siteINI->load();
$selectedExtensionArray       = $siteINI->variable( 'ExtensionSettings', "ActiveExtensions" );
$selectedAccessExtensionArray = $siteINI->variable( 'ExtensionSettings', "ActiveAccessExtensions" );
$selectedExtensions           = array_merge( $selectedExtensionArray, $selectedAccessExtensionArray );
$selectedExtensions           = array_unique( $selectedExtensions );

// When the user clicks on "Apply changes" button in admin interface in the Extensions section
if ( $module->isCurrentAction( 'ActivateExtensions' ) )
{
    $ini = eZINI::instance( 'module.ini' );
    $oldModules = $ini->variable( 'ModuleSettings', 'ModuleList' );
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:30,代码来源:extensions.php

示例5: loadExtensionName

 function loadExtensionName($package, $http, $step, &$persistentData, $tpl)
 {
     $siteINI = eZINI::instance();
     $extensionDir = $siteINI->variable('ExtensionSettings', 'ExtensionDirectory');
     $extensionList = eZDir::findSubItems($extensionDir);
     $tpl->setVariable('extension_list', $extensionList);
 }
开发者ID:runelangseid,项目名称:ezpublish,代码行数:7,代码来源:ezextensionpackagecreator.php

示例6: handleAddParameters

 function handleAddParameters($packageType, $package, $cli, $arguments)
 {
     $arguments = array_unique($arguments);
     $extensionsToAdd = array();
     $siteINI = eZINI::instance();
     $extensionDir = $siteINI->variable('ExtensionSettings', 'ExtensionDirectory');
     $extensionList = eZDir::findSubItems($extensionDir);
     foreach ($arguments as $argument) {
         if (in_array($argument, $extensionList)) {
             $extensionsToAdd[] = $argument;
         } else {
             $cli->error('Extension ' . $cli->style('dir') . $argument . $cli->style('dir-end') . ' not found.');
             return false;
         }
     }
     return $extensionsToAdd;
 }
开发者ID:runelangseid,项目名称:ezpublish,代码行数:17,代码来源:ezextensionpackagehandler.php


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