本文整理汇总了PHP中eZExtension::extensionInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP eZExtension::extensionInfo方法的具体用法?PHP eZExtension::extensionInfo怎么用?PHP eZExtension::extensionInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZExtension
的用法示例。
在下文中一共展示了eZExtension::extensionInfo方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getExtensionsInfo
function getExtensionsInfo()
{
$siteINI = eZINI::instance();
$extensionDir = $siteINI->variable('ExtensionSettings', 'ExtensionDirectory');
$selectedExtensionArray = $siteINI->variable('ExtensionSettings', "ActiveExtensions");
$selectedAccessExtensionArray = $siteINI->variable('ExtensionSettings', "ActiveAccessExtensions");
$selectedExtensions = array_merge($selectedExtensionArray, $selectedAccessExtensionArray);
$selectedExtensions = array_unique($selectedExtensions);
$result = array();
foreach ($selectedExtensions as $extension) {
$extensionInfo = eZExtension::extensionInfo($extension);
if ($extensionInfo) {
$result[$extension] = $extensionInfo;
}
}
return $result;
}
示例2: version
/**
* version
*
* @static
* @return string ezoe version number
*/
public static function version()
{
$info = eZExtension::extensionInfo( 'ezoe' );
return $info['version'];
}
示例3: isset
$objectVersion = isset($Params['ObjectVersion']) ? (int) $Params['ObjectVersion'] : 0;
$dialog = isset($Params['Dialog']) ? trim($Params['Dialog']) : '';
if ($objectID === 0 || $objectVersion === 0) {
echo ezpI18n::tr('design/standard/ezoe', 'Invalid or missing parameter: %parameter', null, array('%parameter' => 'ObjectID/ObjectVersion'));
eZExecution::cleanExit();
}
$object = eZContentObject::fetch($objectID);
if (!$object instanceof eZContentObject || !$object->canRead()) {
echo ezpI18n::tr('design/standard/ezoe', 'Invalid parameter: %parameter = %value', null, array('%parameter' => 'ObjectId', '%value' => $objectID));
eZExecution::cleanExit();
}
if ($dialog === '') {
echo ezpI18n::tr('design/standard/ezoe', 'Invalid or missing parameter: %parameter', null, array('%parameter' => 'Dialog'));
eZExecution::cleanExit();
}
$ezoeInfo = eZExtension::extensionInfo('ezoe');
$tpl = eZTemplate::factory();
$tpl->setVariable('object', $object);
$tpl->setVariable('object_id', $objectID);
$tpl->setVariable('object_version', $objectVersion);
$tpl->setVariable('ezoe_name', $ezoeInfo['name']);
$tpl->setVariable('ezoe_version', $ezoeInfo['version']);
$tpl->setVariable('ezoe_copyright', $ezoeInfo['copyright']);
$tpl->setVariable('ezoe_license', $ezoeInfo['license']);
$tpl->setVariable('ezoe_info_url', $ezoeInfo['info_url']);
// use persistent_variable like content/view does, sending parameters
// to pagelayout as a hash.
$tpl->setVariable('persistent_variable', array());
// run template and return result
$Result = array();
$Result['content'] = $tpl->fetch('design:ezoe/' . $dialog . '.tpl');
示例4: ezgeshiAvailable
static function ezgeshiAvailable()
{
if (in_array('ezsh', eZExtension::activeExtensions())) {
$info = eZExtension::extensionInfo('ezsh');
// since ezp 4.4, we have a lowercase version info
return version_compare(@$info['Version'], '1.3') >= 0 || version_compare(@$info['version'], '1.3') >= 0;
}
return false;
}