本文整理汇总了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;
}
示例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;
}
示例3: loadExtensionName
function loadExtensionName($package, $http, $step, &$persistentData, $tpl)
{
$extensionList = eZDir::findSubItems(eZExtension::baseDirectory(), 'dl');
$tpl->setVariable('extension_list', $extensionList);
}
示例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' );
示例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);
}
示例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;
}