本文整理汇总了PHP中ezpI18n类的典型用法代码示例。如果您正苦于以下问题:PHP ezpI18n类的具体用法?PHP ezpI18n怎么用?PHP ezpI18n使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ezpI18n类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: validateObjectAttributeHTTPInput
function validateObjectAttributeHTTPInput($http, $base, $contentObjectAttribute)
{
$inputParameters = $contentObjectAttribute->inputParameters();
$contentClassAttribute = $contentObjectAttribute->contentClassAttribute();
$parameters = $contentObjectAttribute->validationParameters();
if (isset($parameters['prefix-name']) and $parameters['prefix-name']) {
$parameters['prefix-name'][] = $contentClassAttribute->attribute('name');
} else {
$parameters['prefix-name'] = array($contentClassAttribute->attribute('name'));
}
$status = eZInputValidator::STATE_ACCEPTED;
$postVariableName = $base . "_data_object_relation_list_" . $contentObjectAttribute->attribute("id");
$contentClassAttribute = $contentObjectAttribute->contentClassAttribute();
// Check if selection type is not browse
$classContent = $contentClassAttribute->content();
if ($classContent['selection_type'] != 0) {
$selectedObjectIDArray = $http->hasPostVariable($postVariableName) ? $http->postVariable($postVariableName) : false;
if ($contentObjectAttribute->validateIsRequired() and $selectedObjectIDArray === false) {
$contentObjectAttribute->setValidationError(ezpI18n::tr('kernel/classes/datatypes', 'Missing objectrelation list input.'));
return eZInputValidator::STATE_INVALID;
}
return $status;
}
$content = $contentObjectAttribute->content();
if ($contentObjectAttribute->validateIsRequired() and count($content['relation_list']) == 0) {
$contentObjectAttribute->setValidationError(ezpI18n::tr('kernel/classes/datatypes', 'Missing objectrelation list input.'));
return eZInputValidator::STATE_INVALID;
}
for ($i = 0; $i < count($content['relation_list']); ++$i) {
$relationItem = $content['relation_list'][$i];
if ($relationItem['is_modified']) {
$subObjectID = $relationItem['contentobject_id'];
$subObjectVersion = $relationItem['contentobject_version'];
$attributeBase = $base . '_ezorl_edit_object_' . $subObjectID;
$object = eZContentObject::fetch($subObjectID);
if ($object) {
$attributes = $object->contentObjectAttributes(true, $subObjectVersion, $contentObjectAttribute->attribute('language_code'));
$validationResult = $object->validateInput($attributes, $attributeBase, $inputParameters, $parameters);
$inputValidated = $validationResult['input-validated'];
$content['temp'][$subObjectID]['require-fixup'] = $validationResult['require-fixup'];
$statusMap = $validationResult['status-map'];
foreach ($statusMap as $statusItem) {
$statusValue = $statusItem['value'];
if ($statusValue == eZInputValidator::STATE_INTERMEDIATE and $status == eZInputValidator::STATE_ACCEPTED) {
$status = eZInputValidator::STATE_INTERMEDIATE;
} else {
if ($statusValue == eZInputValidator::STATE_INVALID) {
$contentObjectAttribute->setHasValidationError(false);
$status = eZInputValidator::STATE_INVALID;
}
}
}
$content['temp'][$subObjectID]['attributes'] = $attributes;
$content['temp'][$subObjectID]['object'] = $object;
}
}
}
$contentObjectAttribute->setContent($content);
return $status;
}
开发者ID:rmiguel,项目名称:ezpublish,代码行数:60,代码来源:ezobjectrelationlisttype.php
示例2: eZPaymentGatewayType
function eZPaymentGatewayType()
{
$this->logger = eZPaymentLogger::CreateForAdd( "var/log/eZPaymentGatewayType.log" );
$this->eZWorkflowEventType( eZPaymentGatewayType::WORKFLOW_TYPE_STRING, ezpI18n::tr( 'kernel/workflow/event', "Payment Gateway" ) );
$this->loadAndRegisterGateways();
}
开发者ID:nottavi,项目名称:ezpublish,代码行数:7,代码来源:ezpaymentgatewaytype.php
示例3: validateObjectAttributeHTTPInput
/**
* Validate post data, these are then used by
* {@link eZGmapLocationType::fetchObjectAttributeHTTPInput()}
*
* @param eZHTTPTool $http
* @param string $base
* @param eZContentObjectAttribute $contentObjectAttribute
*/
function validateObjectAttributeHTTPInput( $http, $base, $contentObjectAttribute )
{
$latitude = '';
$longitude = '';
$classAttribute = $contentObjectAttribute->contentClassAttribute();
if ( $http->hasPostVariable( $base . '_data_gmaplocation_latitude_' . $contentObjectAttribute->attribute( 'id' ) ) &&
$http->hasPostVariable( $base . '_data_gmaplocation_longitude_' . $contentObjectAttribute->attribute( 'id' ) ) )
{
$latitude = $http->postVariable( $base . '_data_gmaplocation_latitude_' . $contentObjectAttribute->attribute( 'id' ) );
$longitude = $http->postVariable( $base . '_data_gmaplocation_longitude_' . $contentObjectAttribute->attribute( 'id' ) );
}
if ( $latitude === '' || $longitude === '' )
{
if ( !$classAttribute->attribute( 'is_information_collector' ) && $contentObjectAttribute->validateIsRequired() )
{
$contentObjectAttribute->setValidationError( ezpI18n::tr( 'extension/ezgmaplocation/datatype',
'Missing Latitude/Longitude input.' ) );
return eZInputValidator::STATE_INVALID;
}
}
else if ( !is_numeric( $latitude ) || !is_numeric( $longitude ) )
{
$contentObjectAttribute->setValidationError( ezpI18n::tr( 'extension/ezgmaplocation/datatype',
'Invalid Latitude/Longitude input.' ) );
return eZInputValidator::STATE_INVALID;
}
return eZInputValidator::STATE_ACCEPTED;
}
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:39,代码来源:ezgmaplocationtype.php
示例4: validateObjectAttributeHTTPInput
function validateObjectAttributeHTTPInput( $http, $base, $contentObjectAttribute )
{
if ( $http->hasPostVariable( $base . '_ini_setting_' . $contentObjectAttribute->attribute( 'id' ) ) )
{
$contentClassAttribute = $contentObjectAttribute->attribute( 'contentclass_attribute' );
$iniFile = eZIniSettingType::iniFile( $contentClassAttribute );
$iniSection = eZIniSettingType::iniSection( $contentClassAttribute );
$iniParameterName = eZIniSettingType::iniParameterName( $contentClassAttribute );
$config = eZINI::instance( $iniFile );
if ( $config == null )
{
$contentObjectAttribute->setValidationError( ezpI18n::tr( 'kernel/classes/datatypes',
'Could not locate the ini file.' ) );
return eZInputValidator::STATE_INVALID;
}
if ( $contentClassAttribute->attribute( self::CLASS_TYPE_FIELD ) == self::CLASS_TYPE_ARRAY )
{
$iniArray = array();
// if ( eZIniSettingType::parseArrayInput( $contentObjectAttribute->attribute( 'data_text' ), $iniArray ) === false )
if ( eZIniSettingType::parseArrayInput( $http->postVariable( $base . '_ini_setting_' . $contentObjectAttribute->attribute( 'id' ) ), $iniArray ) === false )
{
$contentObjectAttribute->setValidationError( ezpI18n::tr( 'kernel/classes/datatypes', 'Wrong text field value.' ) );
return eZInputValidator::STATE_INVALID;
}
}
}
return eZInputValidator::STATE_ACCEPTED;
}
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:31,代码来源:ezinisettingtype.php
示例5: validateObjectAttributeHTTPInput
function validateObjectAttributeHTTPInput( $http, $base, $contentObjectAttribute )
{
$classAttribute = $contentObjectAttribute->contentClassAttribute();
if ( $http->hasPostVariable( $base . '_ezkeyword_data_text_' . $contentObjectAttribute->attribute( 'id' ) ) )
{
$data = $http->postVariable( $base . '_ezkeyword_data_text_' . $contentObjectAttribute->attribute( 'id' ) );
if ( $data == "" )
{
if ( !$classAttribute->attribute( 'is_information_collector' ) and $contentObjectAttribute->validateIsRequired() )
{
$contentObjectAttribute->setValidationError( ezpI18n::tr( 'kernel/classes/datatypes',
'Input required.' ) );
return eZInputValidator::STATE_INVALID;
}
}
}
else if ( !$classAttribute->attribute( 'is_information_collector' ) and $contentObjectAttribute->validateIsRequired() )
{
$contentObjectAttribute->setValidationError( ezpI18n::tr( 'kernel/classes/datatypes', 'Input required.' ) );
return eZInputValidator::STATE_INVALID;
}
return eZInputValidator::STATE_ACCEPTED;
}
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:25,代码来源:ezkeywordtype.php
示例6: eZTopMenuOperator
function eZTopMenuOperator( $name = 'topmenu' )
{
$this->Operators = array( $name );
$this->DefaultNames = array(
'content' => array( 'name' => ezpI18n::tr( 'design/admin/pagelayout',
'Content structure' ),
'tooltip'=> ezpI18n::tr( 'design/admin/pagelayout',
'Manage the main content structure of the site.' ) ),
'media' => array( 'name' => ezpI18n::tr( 'design/admin/pagelayout',
'Media library' ),
'tooltip'=> ezpI18n::tr( 'design/admin/pagelayout',
'Manage images, files, documents, etc.' ) ),
'users' => array( 'name' => ezpI18n::tr( 'design/admin/pagelayout',
'User accounts' ),
'tooltip'=> ezpI18n::tr( 'design/admin/pagelayout',
'Manage users, user groups and permission settings.' ) ),
'shop' => array( 'name' => ezpI18n::tr( 'design/admin/pagelayout',
'Webshop' ),
'tooltip'=> ezpI18n::tr( 'design/admin/pagelayout',
'Manage customers, orders, discounts and VAT types; view sales statistics.' ) ),
'design' => array( 'name' => ezpI18n::tr( 'design/admin/pagelayout',
'Design' ),
'tooltip'=> ezpI18n::tr( 'design/admin/pagelayout',
'Manage templates, menus, toolbars and other things related to appearence.' ) ),
'setup' => array( 'name' => ezpI18n::tr( 'design/admin/pagelayout',
'Setup' ),
'tooltip'=> ezpI18n::tr( 'design/admin/pagelayout',
'Configure settings and manage advanced functionality.' ) ),
'dashboard' => array( 'name' => ezpI18n::tr( 'design/admin/pagelayout',
'Dashboard' ),
'tooltip'=> ezpI18n::tr( 'design/admin/pagelayout',
'Manage items and settings that belong to your account.' ) ) );
}
开发者ID:nottavi,项目名称:ezpublish,代码行数:33,代码来源:eztopmenuoperator.php
示例7: display
function display()
{
$siteType = $this->chosenSiteType();
$siteaccessURLs = $this->siteaccessURLs();
$siteType['url'] = $siteaccessURLs['url'];
$siteType['admin_url'] = $siteaccessURLs['admin_url'];
$customText = isset( $this->PersistenceList['final_text'] ) ? $this->PersistenceList['final_text'] : '';
$this->Tpl->setVariable( 'site_type', $siteType );
$this->Tpl->setVariable( 'custom_text', $customText );
$this->Tpl->setVariable( 'setup_previous_step', 'Final' );
$this->Tpl->setVariable( 'setup_next_step', 'Final' );
$result = array();
// Display template
$result['content'] = $this->Tpl->fetch( 'design:setup/init/final.tpl' );
$result['path'] = array( array( 'text' => ezpI18n::tr( 'design/standard/setup/init',
'Finished' ),
'url' => false ) );
return $result;
}
开发者ID:nottavi,项目名称:ezpublish,代码行数:27,代码来源:ezstep_final.php
示例8: run
protected static function run()
{
self::checkIfLoggedIn();
$ini = eZINI::instance('cookielaw.ini');
if (self::$isActive) {
$message = ezpI18n::tr('extension/occookielaw', "I cookie ci aiutano ad erogare servizi di qualità. Utilizzando i nostri servizi, l'utente accetta le nostre modalità d'uso dei cookie.");
if ($ini->hasVariable('AlertSettings', 'MessageText')) {
$message = $ini->variable('AlertSettings', 'MessageText');
}
$dismiss = ezpI18n::tr('extension/occookielaw', "OK");
if ($ini->hasVariable('AlertSettings', 'DismissButtonText')) {
$dismiss = $ini->variable('AlertSettings', 'DismissButtonText');
}
$info = ezpI18n::tr('extension/occookielaw', "Maggiori informazioni");
if ($ini->hasVariable('AlertSettings', 'InfoButtonText')) {
$info = $ini->variable('AlertSettings', 'InfoButtonText');
}
$tpl = eZTemplate::factory();
$tpl->setVariable('message', $message);
$tpl->setVariable('dismiss_button', $dismiss);
$tpl->setVariable('info_button', $info);
return $tpl->fetch('design:inject_in_page_layout.tpl');
}
return '';
}
开发者ID:OpencontentCoop,项目名称:occookielaw,代码行数:25,代码来源:occookielaw.php
示例9: capture
public function capture(eZOrder $order)
{
//start the capture transaction
$response = self::transaction($order);
if ($response and $response !== "") {
$response_array = array();
//go through all lines of the result
foreach (preg_split("/((\r?\n)|(\r\n?))/", $response) as $line) {
//prepare a nice readable array
$tmp_explode_result = explode("=", $line);
if (count($tmp_explode_result) >= 2) {
$response_array[$tmp_explode_result[0]] = $tmp_explode_result[1];
}
}
if (count($response_array) >= 1 and $response_array["status"] === "APPROVED") {
eZLog::write("SUCCESS in step 3 ('capture') for order ID " . $order->ID, $logName = 'xrowpayone.log', $dir = 'var/log');
} else {
eZLog::write("FAILED in step 3 ('capture') for order ID " . $order->ID . " with ERRORCODE " . $response_array['errorcode'] . " Message: " . $response_array['errormessage'], $logName = 'xrowpayone.log', $dir = 'var/log');
return "Error Code: " . $response_array["errorcode"] . " Error Message: " . $response_array["errormessage"] . " (Order Nr. " . $order->OrderNr . ")";
}
} else {
eZLog::write("ERROR: \$response not set or empty in file " . __FILE__ . " on line " . __LINE__ . " for Order ID " . $order->ID, $logName = 'xrowpayone.log', $dir = 'var/log');
return ezpI18n::tr('extension/xrowpayone', 'Incorrect or no answer of the payone server.') . " (Order Nr. " . $order->OrderNr . ")";
}
return true;
}
开发者ID:xrowgmbh,项目名称:xrowpayone,代码行数:26,代码来源:xrowpayone.php
示例10: create
static function create($user_id)
{
$config = eZINI::instance('site.ini');
$dateTime = time();
$row = array('id' => null, 'node_id', '', 'title' => ezpI18n::tr('kernel/classes', 'New RSS Export'), 'site_access' => '', 'modifier_id' => $user_id, 'modified' => $dateTime, 'creator_id' => $user_id, 'created' => $dateTime, 'status' => self::STATUS_DRAFT, 'url' => 'http://' . $config->variable('SiteSettings', 'SiteURL'), 'description' => '', 'image_id' => 0, 'active' => 1, 'access_url' => '');
return new eZRSSExport($row);
}
开发者ID:nfrp,项目名称:ezpublish,代码行数:7,代码来源:ezrssexport.php
示例11: validateObjectAttributeHTTPInput
function validateObjectAttributeHTTPInput( $http, $base, $contentObjectAttribute )
{
if ( $http->hasPostVariable( $base . "_ezurl_url_" . $contentObjectAttribute->attribute( "id" ) ) and
$http->hasPostVariable( $base . "_ezurl_text_" . $contentObjectAttribute->attribute( "id" ) )
)
{
$url = $http->PostVariable( $base . "_ezurl_url_" . $contentObjectAttribute->attribute( "id" ) );
$text = $http->PostVariable( $base . "_ezurl_text_" . $contentObjectAttribute->attribute( "id" ) );
if ( $contentObjectAttribute->validateIsRequired() )
if ( $url == "" )
{
$contentObjectAttribute->setValidationError( ezpI18n::tr( 'kernel/classes/datatypes',
'Input required.' ) );
return eZInputValidator::STATE_INVALID;
}
// Remove all url-object links to this attribute.
eZURLObjectLink::removeURLlinkList( $contentObjectAttribute->attribute( "id" ), $contentObjectAttribute->attribute('version') );
}
else if ( $contentObjectAttribute->validateIsRequired() )
{
$contentObjectAttribute->setValidationError( ezpI18n::tr( 'kernel/classes/datatypes', 'Input required.' ) );
return eZInputValidator::STATE_INVALID;
}
return eZInputValidator::STATE_ACCEPTED;
}
开发者ID:robinmuilwijk,项目名称:ezpublish,代码行数:25,代码来源:ezurltype.php
示例12: __construct
/**
* @param int $objectID ContentObjectID
*/
public function __construct($objectID)
{
$userID = eZUser::currentUserID();
$message = ezpI18n::tr('design/standard/error/kernel', 'Access denied') . '. ' . ezpI18n::tr('design/standard/error/kernel', 'You do not have permission to access this area.');
eZLog::write("Access denied to content object #{$objectID} for user #{$userID}", 'error.log');
parent::__construct($message);
}
开发者ID:mugoweb,项目名称:ezpublish-legacy,代码行数:10,代码来源:access_denied.php
示例13: create
static function create()
{
$row = array(
"id" => null,
"name" => ezpI18n::tr( "kernel/shop/discountgroup", "New discount group" ) );
return new eZDiscountRule( $row );
}
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:7,代码来源:ezdiscountrule.php
示例14: validateObjectAttributeHTTPInput
function validateObjectAttributeHTTPInput($http, $base, $contentObjectAttribute)
{
$classAttribute = $contentObjectAttribute->contentClassAttribute();
if ($http->hasPostVariable($base . "_data_rangeoption_name_" . $contentObjectAttribute->attribute("id")) and $http->hasPostVariable($base . '_data_rangeoption_start_value_' . $contentObjectAttribute->attribute('id')) and $http->hasPostVariable($base . '_data_rangeoption_stop_value_' . $contentObjectAttribute->attribute('id')) and $http->hasPostVariable($base . '_data_rangeoption_step_value_' . $contentObjectAttribute->attribute('id'))) {
$name = $http->postVariable($base . "_data_rangeoption_name_" . $contentObjectAttribute->attribute("id"));
$startValue = $http->postVariable($base . '_data_rangeoption_start_value_' . $contentObjectAttribute->attribute('id'));
$stopValue = $http->postVariable($base . '_data_rangeoption_stop_value_' . $contentObjectAttribute->attribute('id'));
$stepValue = $http->postVariable($base . '_data_rangeoption_step_value_' . $contentObjectAttribute->attribute('id'));
if ($name == '' or $startValue == '' or $stopValue == '' or $stepValue == '') {
if (!$classAttribute->attribute('is_information_collector') and $contentObjectAttribute->validateIsRequired()) {
$contentObjectAttribute->setValidationError(ezpI18n::tr('kernel/classes/datatypes', 'Missing range option input.'));
return eZInputValidator::STATE_INVALID;
} else {
return eZInputValidator::STATE_ACCEPTED;
}
}
} else {
if (!$classAttribute->attribute('is_information_collector') and $contentObjectAttribute->validateIsRequired()) {
$contentObjectAttribute->setValidationError(ezpI18n::tr('kernel/classes/datatypes', 'Missing range option input.'));
return eZInputValidator::STATE_INVALID;
} else {
return eZInputValidator::STATE_ACCEPTED;
}
}
}
开发者ID:nfrp,项目名称:ezpublish,代码行数:25,代码来源:ezrangeoptiontype.php
示例15: display
function display()
{
// Get site templates from setup.ini
$config = eZINI::instance('setup.ini');
$thumbnailBase = $config->variable('SiteTemplates', 'ThumbnailBase');
$thumbnailExtension = $config->variable('SiteTemplates', 'ThumbnailExtension');
$site_templates = array();
$packages = eZPackage::fetchPackages(array('path' => 'kernel/setup/packages'));
foreach ($packages as $key => $package) {
$site_templates[$key]['name'] = $package->attribute('summary');
$site_templates[$key]['identifier'] = $package->attribute('name');
$thumbnails = $package->thumbnailList('default');
if (count($thumbnails) > 0) {
$site_templates[$key]['image_file_name'] = $package->fileItemPath($thumbnails[0], 'default', 'kernel/setup/packages');
} else {
$site_templates[$key]['image_file_name'] = false;
}
}
$this->Tpl->setVariable('site_templates', $site_templates);
$this->Tpl->setVariable('error', $this->Error);
// Return template and data to be shown
$result = array();
// Display template
$result['content'] = $this->Tpl->fetch('design:setup/init/site_templates.tpl');
$result['path'] = array(array('text' => ezpI18n::tr('design/standard/setup/init', 'Site template selection'), 'url' => false));
return $result;
}
开发者ID:EVE-Corp-Center,项目名称:ECC-Website,代码行数:27,代码来源:ezstep_site_templates.php
示例16: create
static function create($user_id)
{
$config = eZINI::instance('site.ini');
$dateTime = time();
$row = array('id' => null, 'title' => ezpI18n::tr('kernel/pdfexport', 'New PDF Export'), 'show_frontpage' => 1, 'intro_text' => '', 'sub_text' => '', 'source_node_id' => 0, 'export_structure' => 'tree', 'export_classes' => '', 'site_access' => '', 'pdf_filename' => 'file.pdf', 'modifier_id' => $user_id, 'modified' => $dateTime, 'creator_id' => $user_id, 'created' => $dateTime, 'status' => 0, 'version' => 1);
return new eZPDFExport($row);
}
开发者ID:CG77,项目名称:ezpublish-legacy,代码行数:7,代码来源:ezpdfexport.php
示例17: prepareMessageText
/**
* @return string
*/
private function prepareMessageText()
{
$http = BlockDefault::http();
$title = $http->hasPostVariable( 'salutation' ) ? stripslashes( $http->postVariable( 'salutation' ) ) : '';
$firstName = $http->hasPostVariable( 'first_name' ) ? stripslashes( $http->postVariable( 'first_name' ) ) : '';
$lastName = $http->hasPostVariable( 'last_name' ) ? stripslashes( $http->postVariable( 'last_name' ) ) : '';
$phone = $http->hasPostVariable( 'phone' ) ? stripslashes( $http->postVariable( 'phone' ) ) : '';
$address = $http->hasPostVariable( 'address1' ) ? stripslashes( $http->postVariable( 'address1' ) . ' - ' . $http->postVariable( 'address2' ) ) : '';
$postalCode = $http->hasPostVariable( 'cp' ) ? stripslashes( $http->postVariable( 'cp' ) ) : '';
$location = $http->hasPostVariable( 'country' ) ? stripslashes( $http->postVariable( 'country' ) . ', ' . $http->postVariable( 'city' ) ) : '';
$email = $http->hasPostVariable( 'email' ) ? stripslashes( $http->postVariable( 'email' ) ) : '';
$codeTVF = $http->hasPostVariable( 'tvf' ) ? stripslashes( $http->postVariable( 'tvf' ) ) : '';
$articleTitle = $http->hasPostVariable( 'titleArticle' ) ? stripslashes( $http->postVariable( 'titleArticle' ) ) : '';
$articleAuthor = $http->hasPostVariable( 'firstAuthor' ) ? stripslashes( $http->postVariable( 'firstAuthor' ) ) : '';
$journalName = $http->hasPostVariable( 'nameRevue' ) ? stripslashes( $http->postVariable( 'nameRevue' ) ) : '';
$publicationDate = $http->hasPostVariable( 'publishedDate' ) ? stripslashes( $http->postVariable( 'publishedDate' ) ) : '';
$issueNumber = $http->hasPostVariable( 'numberRevue' ) ? stripslashes( $http->postVariable( 'numberRevue' ) ) : '';
$firstPage = $http->hasPostVariable( 'firstPage' ) ? stripslashes( $http->postVariable( 'firstPage' ) ) : '';
$additionalInfo = $http->hasPostVariable( 'infos' ) ? stripslashes( $http->postVariable( 'infos' ) ) : '';
$message = ezpI18n::tr( 'application/fulltext', 'MAIL CONTENT', null, array(
'{0}' => $title, '{1}' => $firstName, '{2}' => $lastName, '{3}' => $phone, '{4}' => $address, '{5}' => $postalCode, '{6}' => $location, '{7}' => $email, '{8}' => $codeTVF, '{9}' => $articleTitle, '{10}' => $articleAuthor, '{11}' => $journalName, '{12}' => $publicationDate, '{13}' => $issueNumber, '{14}' => $firstPage, '{15}' => $additionalInfo
) );
return stripslashes( $message );
}
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:30,代码来源:mmfulltext.php
示例18: mcSearch
/**
* @param string $term
* @param bool $wal
* @return array
*/
protected function mcSearch( $term, $wal )
{
$session = curl_init();
curl_setopt( $session, CURLOPT_URL, $this->anonymousUrl . "/solr/$term/json" );
curl_setopt( $session, CURLOPT_HEADER, false );
curl_setopt( $session, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $session, CURLOPT_FOLLOWLOCATION, true );
$response = curl_exec( $session );
curl_close( $session );
$response = json_decode( $response, true );
$displayedTerm = mb_strlen( $term ) > 34 ? mb_substr( $term, 0, 34 ) . '...' : $term;
$result = array(
'term' => str_replace( '+', ' ', $term ),
'count' => $response['count'],
'resultUrl' => $response['resultUrl'],
'mcAppUrl' => CacheApplicationTool::buildLocalizedApplicationByIdentifier( 'merck-connect' )->applicationUrl() . "#?s=$term",
'message' => ezpI18n::tr( "merck/merck_connect", "%nbresult RESULTS FOR <strong>%searchterm</strong> ON MERCK CONNECT", null, array(
"%nbresult" => $response['count'],
"%searchterm" => str_replace( '+', ' ', $displayedTerm )
) ) . ' >',
);
if( $wal && self::user() )
{
$result['al'] = $this->anonymousUrl . '/genericsearch.xhtml?q=' . $term . '<oken=' . $this->getAutologinLink( true );
}
if( $wal && !self::user() )
{
$result['al'] = $this->anonymousUrl;
}
return $result;
}
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:38,代码来源:mmmerckonnect.php
示例19: fetchList
/**
* Return a list of all cache items in the system.
*
* @return array The list of cache items
*/
static function fetchList()
{
static $cacheList = null;
if ($cacheList === null) {
$ini = eZINI::instance();
$textToImageIni = eZINI::instance('texttoimage.ini');
$cacheList = array(array('name' => ezpI18n::tr('kernel/cache', 'Content view cache'), 'id' => 'content', 'is-clustered' => true, 'tag' => array('content'), 'expiry-key' => 'content-view-cache', 'enabled' => $ini->variable('ContentSettings', 'ViewCaching') == 'enabled', 'path' => $ini->variable('ContentSettings', 'CacheDir'), 'function' => array('eZCache', 'clearContentCache')), array('name' => ezpI18n::tr('kernel/cache', 'Global INI cache'), 'id' => 'global_ini', 'tag' => array('ini'), 'enabled' => true, 'path' => 'var/cache/ini', 'function' => array('eZCache', 'clearGlobalINICache'), 'purge-function' => array('eZCache', 'clearGlobalINICache')), array('name' => ezpI18n::tr('kernel/cache', 'INI cache'), 'id' => 'ini', 'tag' => array('ini'), 'enabled' => true, 'path' => 'ini'), array('name' => ezpI18n::tr('kernel/cache', 'Codepage cache'), 'id' => 'codepage', 'tag' => array('codepage'), 'enabled' => true, 'path' => 'codepages'), array('name' => ezpI18n::tr('kernel/cache', 'Class identifier cache'), 'id' => 'classid', 'tag' => array('content'), 'expiry-key' => 'class-identifier-cache', 'enabled' => true, 'path' => false, 'is-clustered' => true, 'function' => array('eZCache', 'clearClassID'), 'purge-function' => array('eZCache', 'clearClassID')), array('name' => ezpI18n::tr('kernel/cache', 'Sort key cache'), 'id' => 'sortkey', 'tag' => array('content'), 'expiry-key' => 'sort-key-cache', 'enabled' => true, 'path' => false, 'function' => array('eZCache', 'clearSortKey'), 'purge-function' => array('eZCache', 'clearSortKey'), 'is-clustered' => true), array('name' => ezpI18n::tr('kernel/cache', 'URL alias cache'), 'id' => 'urlalias', 'is-clustered' => true, 'tag' => array('content'), 'enabled' => true, 'path' => 'wildcard'), array('name' => ezpI18n::tr('kernel/cache', 'Character transformation cache'), 'id' => 'chartrans', 'tag' => array('i18n'), 'enabled' => true, 'path' => 'trans'), array('name' => ezpI18n::tr('kernel/cache', 'Image alias'), 'id' => 'imagealias', 'tag' => array('image'), 'path' => false, 'enabled' => true, 'function' => array('eZCache', 'clearImageAlias'), 'purge-function' => array('eZCache', 'purgeImageAlias'), 'is-clustered' => true), array('name' => ezpI18n::tr('kernel/cache', 'Template cache'), 'id' => 'template', 'tag' => array('template'), 'enabled' => $ini->variable('TemplateSettings', 'TemplateCompile') == 'enabled', 'path' => 'template'), array('name' => ezpI18n::tr('kernel/cache', 'Template block cache'), 'id' => 'template-block', 'is-clustered' => true, 'tag' => array('template', 'content'), 'expiry-key' => 'global-template-block-cache', 'enabled' => $ini->variable('TemplateSettings', 'TemplateCache') == 'enabled', 'path' => 'template-block', 'function' => array('eZCache', 'clearTemplateBlockCache')), array('name' => ezpI18n::tr('kernel/cache', 'Template override cache'), 'id' => 'template-override', 'tag' => array('template'), 'enabled' => true, 'path' => 'override', 'function' => array('eZCache', 'clearTemplateOverrideCache')), array('name' => ezpI18n::tr('kernel/cache', 'Text to image cache'), 'id' => 'texttoimage', 'tag' => array('template'), 'enabled' => $textToImageIni->variable('ImageSettings', 'UseCache') == 'enabled', 'path' => $textToImageIni->variable('PathSettings', 'CacheDir'), 'function' => array('eZCache', 'clearTextToImageCache'), 'purge-function' => array('eZCache', 'purgeTextToImageCache'), 'is-clustered' => true), array('name' => ezpI18n::tr('kernel/cache', 'RSS cache'), 'id' => 'rss_cache', 'is-clustered' => true, 'tag' => array('content'), 'enabled' => true, 'path' => 'rss'), array('name' => ezpI18n::tr('kernel/cache', 'User info cache'), 'id' => 'user_info_cache', 'is-clustered' => true, 'tag' => array('user'), 'expiry-key' => 'user-info-cache', 'enabled' => true, 'path' => 'user-info', 'function' => array('eZCache', 'clearUserInfoCache')), array('name' => ezpI18n::tr('kernel/cache', 'Content tree menu (browser cache)'), 'id' => 'content_tree_menu', 'tag' => array('content'), 'path' => false, 'enabled' => true, 'function' => array('eZCache', 'clearContentTreeMenu'), 'purge-function' => array('eZCache', 'clearContentTreeMenu')), array('name' => ezpI18n::tr('kernel/cache', 'State limitations cache'), 'is-clustered' => true, 'id' => 'state_limitations', 'tag' => array('content'), 'expiry-key' => 'state-limitations', 'enabled' => true, 'path' => false, 'function' => array('eZCache', 'clearStateLimitations'), 'purge-function' => array('eZCache', 'clearStateLimitations')), array('name' => ezpI18n::tr('kernel/cache', 'Design base cache'), 'id' => 'design_base', 'tag' => array('template'), 'enabled' => $ini->variable('DesignSettings', 'DesignLocationCache') == 'enabled', 'path' => false, 'function' => array('eZCache', 'clearDesignBaseCache'), 'purge-function' => array('eZCache', 'clearDesignBaseCache')), array('name' => ezpI18n::tr('kernel/cache', 'Active extensions cache'), 'id' => 'active_extensions', 'tag' => array('ini'), 'expiry-key' => 'active-extensions-cache', 'enabled' => true, 'path' => false, 'function' => array('eZCache', 'clearActiveExtensions'), 'purge-function' => array('eZCache', 'clearActiveExtensions')), array('name' => ezpI18n::tr('kernel/cache', 'TS Translation cache'), 'id' => 'translation', 'tag' => array('i18n'), 'enabled' => true, 'expiry-key' => 'ts-translation-cache', 'path' => 'translation', 'function' => array('eZCache', 'clearTSTranslationCache')), array('name' => ezpI18n::tr('kernel/cache', 'SSL Zones cache'), 'id' => 'sslzones', 'tag' => array('ini'), 'enabled' => eZSSLZone::enabled(), 'path' => false, 'function' => array('eZSSLZone', 'clearCache'), 'purge-function' => array('eZSSLZone', 'clearCache')));
// Append cache items defined (in ini) by extensions, see site.ini[Cache] for details
foreach ($ini->variable('Cache', 'CacheItems') as $cacheItemKey) {
$name = 'Cache_' . $cacheItemKey;
if (!$ini->hasSection($name)) {
eZDebug::writeWarning("Missing site.ini section: '{$name}', skipping!", __METHOD__);
continue;
}
$cacheItem = array();
if ($ini->hasVariable($name, 'name')) {
$cacheItem['name'] = $ini->variable($name, 'name');
} else {
$cacheItem['name'] = ucwords($cacheItemKey);
}
if ($ini->hasVariable($name, 'id')) {
$cacheItem['id'] = $ini->variable($name, 'id');
} else {
$cacheItem['id'] = $cacheItemKey;
}
if ($ini->hasVariable($name, 'isClustered')) {
$cacheItem['is-clustered'] = $ini->variable($name, 'isClustered');
} else {
$cacheItem['is-clustered'] = false;
}
if ($ini->hasVariable($name, 'tags')) {
$cacheItem['tag'] = $ini->variable($name, 'tags');
} else {
$cacheItem['tag'] = array();
}
if ($ini->hasVariable($name, 'expiryKey')) {
$cacheItem['expiry-key'] = $ini->variable($name, 'expiryKey');
}
if ($ini->hasVariable($name, 'enabled')) {
$cacheItem['enabled'] = $ini->variable($name, 'enabled');
} else {
$cacheItem['enabled'] = true;
}
if ($ini->hasVariable($name, 'path')) {
$cacheItem['path'] = $ini->variable($name, 'path');
} else {
$cacheItem['path'] = false;
}
if ($ini->hasVariable($name, 'class')) {
$cacheItem['function'] = array($ini->variable($name, 'class'), 'clearCache');
}
if ($ini->hasVariable($name, 'purgeClass')) {
$cacheItem['purge-function'] = array($ini->variable($name, 'purgeClass'), 'purgeCache');
}
$cacheList[] = $cacheItem;
}
}
return $cacheList;
}
开发者ID:nfrp,项目名称:ezpublish,代码行数:64,代码来源:ezcache.php
示例20: __construct
function __construct()
{
$this->CjwNewsletterFilterType('cjwnl_email', ezpI18n::tr('cjw_newsletter/filtertypes', 'Email', 'Filtertype name'), array());
$this->setValues(array());
$this->setValuesAvailable('text');
$this->setOperation('like');
$this->setOperationsAvailable(array('eq' => ezpI18n::tr('cjw_newsletter/filtertypes', 'equal', 'Filtertype condition'), 'like' => ezpI18n::tr('cjw_newsletter/filtertypes', 'contains', 'Filtertype condition')));
}
开发者ID:hudri,项目名称:cjw_newslet |
请发表评论