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


PHP BFCHelper::getLanguage方法代码示例

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


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

示例1: getResourceFromService

 public function getResourceFromService()
 {
     $params = $this->getState('params');
     $resourceId = $params['resourceId'];
     $resourceIdRef = $params['resourceId'];
     $options = array('path' => sprintf($this->urlResource, $resourceId), 'data' => array('$format' => 'json'));
     $url = $this->helper->getQuery($options);
     $resource = null;
     $r = $this->helper->executeQuery($url);
     if (isset($r)) {
         $res = json_decode($r);
         //$resource = $res->d->results ?: $res->d;
         if (!empty($res->d->results)) {
             $resource = $res->d->results;
         } elseif (!empty($res->d)) {
             $resource = $res->d;
         }
         $resource->Merchant = BFCHelper::getMerchantFromServicebyId($resource->MerchantId);
         //		$resource->Services = $resource->OnSellUnit->Services;
         if (!empty($resource->ServiceIdList)) {
             $services = BFCHelper::GetServicesByIds($resource->ServiceIdList);
             if (count($resource->Services) > 0) {
                 $tmpservices = array();
                 foreach ($resource->Services as $service) {
                     $tmpservices[] = BFCHelper::getLanguage($service->Name, $this->language);
                 }
                 $services = implode(', ', $tmpservices);
             }
             $resource->Services = $services;
         }
     }
     return $resource;
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:33,代码来源:onsellunit.php

示例2: setBreadcrumb

 function setBreadcrumb($resource, $layout = '', $language)
 {
     if (!empty($resource)) {
         $mainframe = JFactory::getApplication();
         $pathway = $mainframe->getPathway();
         $count = count($pathway);
         $newPathway = array();
         if ($count > 1) {
             $newPathway = array_pop($pathway);
         }
         $pathway->setPathway($newPathway);
         //		$pathway->addItem(
         //			$resource->Merchant->Name,
         //			JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $resource->Merchant->MerchantId . ':' . BFCHelper::getSlug($resource->Merchant->Name))
         //		);
         //		$pathway->addItem(
         //			JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_MERCHANTDETAILS_LAYOUT_' . strtoupper($layout) ),
         //			JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&layout=' . $layout . '&merchantId=' . $resource->Merchant->MerchantId . ':' . BFCHelper::getSlug($resource->Merchant->Name))
         //		);
         //		$resourceName = BFCHelper::getLanguage($resource->Name, $language);
         $resourceName = BFCHelper::getLanguage($resource->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
         //		echo "<pre>";
         //		echo print_r($resource);
         //		echo "</pre>";
         $pathway->addItem($resourceName, JRoute::_('index.php?option=com_bookingforconnector&view=resource&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName)));
     }
 }
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:27,代码来源:resourceview.php

示例3: setBreadcrumb

 function setBreadcrumb($resource, $layout = '')
 {
     $mainframe = JFactory::getApplication();
     $pathway = $mainframe->getPathway();
     $pathway->addItem($resource->Merchant->Name, JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $resource->Merchant->MerchantId . ':' . BFCHelper::getSlug($resource->Merchant->Name)));
     $pathway->addItem(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_MERCHANTDETAILS_LAYOUT_' . strtoupper($layout)), JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&layout=' . $layout . '&merchantId=' . $resource->Merchant->MerchantId . ':' . BFCHelper::getSlug($resource->Merchant->Name)));
     //		$resourceName = BFCHelper::getLanguage($resource->Name, $this->Language);
     $resourceName = BFCHelper::getLanguage($resource->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
     $pathway->addItem($resourceName, JRoute::_('index.php?option=com_bookingforconnector&view=resource&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName)));
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:10,代码来源:view.raw.php

示例4: setBreadcrumb

 function setBreadcrumb($resource, $layout = '', $language)
 {
     if (!empty($resource)) {
         $mainframe = JFactory::getApplication();
         $pathway = $mainframe->getPathway();
         // resetto il pathway
         $pathway->setPathway(null);
         //				$resourceName = BFCHelper::getLanguage($resource->Name, $language);
         $resourceName = BFCHelper::getLanguage($resource->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
         $pathway->addItem($resource->MerchantName, JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $resource->MerchantId . ':' . BFCHelper::getSlug($resource->MerchantName)));
         $pathway->addItem($resourceName, JRoute::_('index.php?option=com_bookingforconnector&view=onsellunit&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName)));
     }
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:13,代码来源:resourceview.php

示例5: getOptions

 /**
  * Method to get a list of options for a list input.
  *
  * @return	array		An array of JHtml options.
  */
 protected function getOptions()
 {
     $document = JFactory::getDocument();
     $language = $document->getLanguage();
     $masterTypologies = BFCHelper::getMasterTypologies();
     $options = array();
     if ($masterTypologies) {
         foreach ($masterTypologies as $masterTypology) {
             $options[] = JHtml::_('select.option', $masterTypology->MasterTypologyId, BFCHelper::getLanguage($masterTypology->Name, $language));
         }
     }
     $options = array_merge(parent::getOptions(), $options);
     return $options;
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:19,代码来源:mastertypologies.php

示例6: getOptions

 /**
  * Method to get a list of options for a list input.
  *
  * @return	array		An array of JHtml options.
  */
 protected function getOptions()
 {
     $document = JFactory::getDocument();
     $language = $document->getLanguage();
     $merchantCategories = BFCHelper::getMerchantCategories();
     $options = array();
     if ($merchantCategories) {
         foreach ($merchantCategories as $merchantCategory) {
             $currOpt = JHtml::_('select.option', $merchantCategory->MerchantCategoryId, BFCHelper::getLanguage($merchantCategory->Name, $language));
             $currOpt->checked = null;
             $options[] = $currOpt;
         }
     }
     $options = array_merge(parent::getOptions(), $options);
     return $options;
 }
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:21,代码来源:merchantcategories.php

示例7: array

    $merchantAddress = true;
}
$merchantname = BFCHelper::getLanguage($merchant->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
$resourceName = BFCHelper::getLanguage($resource->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
$resourceDescription = BFCHelper::getLanguage($resource->Description, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
$hashorder = JRequest::getVar('hash');
if (empty($hashorder)) {
    if ($merchant->RatingsContext !== 2 && $merchant->RatingsContext !== 3) {
        //redirect alla risorsa senza possibilità di renensirla
        header("Location: " . JRoute::_('index.php?option=com_bookingforconnector&view=resource&resourceId=' . $resource->UnitId . ':' . BFCHelper::getSlug($resourceName), true, -1));
        $app = JFactory::getApplication();
        $app->close();
    }
}
$this->document->setTitle($resourceName . ' - ' . $merchant->Name);
$this->document->setDescription(BFCHelper::getLanguage($resource->Description, $this->language));
$user = JFactory::getUser();
//if (!$user->guest) {
//  echo 'You are logged in as:<br />';
//  echo 'User name: ' . $user->username . '<br />';
//  echo 'Real name: ' . $user->name . '<br />';
//  echo 'User ID  : ' . $user->id . '<br />';
//}
//echo ("<pre>");
//echo (print_r($user));
//echo ("</pre>");
?>
<div class="com_bookingforconnector_resource com_bookingforconnector_resource-mt<?php 
echo $merchant->MerchantTypeId;
?>
 com_bookingforconnector_resource-t<?php 
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:31,代码来源:rating.php

示例8:

} else {
    $uriMerchant .= '&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name);
}
$routeMerchant = JRoute::_($uriMerchant);
//$route = JRoute::_('index.php?option=com_bookingforconnector&view=onsellunit&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName));
//$routeMerchant = JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $resource->MerchantId . ':' . BFCHelper::getSlug($merchant->Name));
$resourceImageUrl = Juri::base() . "/images/default.jpg";
$merchantLogoPath = Juri::base() . "/images/default.jpg";
//	if ($resource->ImageUrl != '') {
//		$resourceImageUrl = BFCHelper::getImageUrl('resources',$resource->ImageUrl, 'resource_list_default');
if ($merchant->LogoUrl != '') {
    $merchantLogoPath = BFCHelper::getImageUrl('merchant', $merchant->LogoUrl, 'merchant_logo_small_rapidview');
}
$isMerchantAnonymous = BFCHelper::isMerchantAnonymous($merchant->MerchantTypeId);
$contractType = $resource->ContractType ? JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_ONSELLUNIT_CONTRACTTYPE1') : JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_ONSELLUNIT_CONTRACTTYPE');
$typeName = BFCHelper::getLanguage($resource->CategoryName, $this->language);
//echo "<pre>";
//echo print_r($resource);
//echo "</pre>";
//$showResourceMap = false;
?>
<style>
.flexslider { 
	margin: 0; background: #fff; 
	border: 0px solid #fff; 
	border-right: 1px solid #fff; 
	position: relative; 
	-webkit-border-radius: 0px; 
	-moz-border-radius: 0px;
	-o-border-radius: 0px;
	border-radius: 0px; 
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:31,代码来源:rapidview.php

示例9: foreach

    ?>
</h4>
		<?php 
    $count = 0;
    ?>
		<?php 
    foreach ($services as $service) {
        ?>
			<?php 
        if ($count > 0) {
            echo ',';
        }
        ?>
			
			<span class="com_bookingforconnector_resource-services-service"><?php 
        echo BFCHelper::getLanguage($service->Name, $language);
        ?>
</span>
			<?php 
        $count += 1;
        ?>
		<?php 
    }
    ?>
	</div>
	<?php 
}
?>
	<?php 
if ($merchantRules != null && $merchantRules != '' || $resourceRules != null && $resourceRules != '') {
    ?>
开发者ID:Bookingfor,项目名称:wordpress-plugin,代码行数:31,代码来源:resource.php

示例10: defined

<?php

// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$this->document->setTitle($this->item->Name);
$this->document->setDescription(BFCHelper::getLanguage($this->item->Description, $this->language));
$merchantSiteUrl = '';
if ($this->item->AddressData->SiteUrl != '') {
    $merchantSiteUrl = $this->item->AddressData->SiteUrl;
    $parsed = parse_url($merchantSiteUrl);
    if (empty($parsed['scheme'])) {
        $merchantSiteUrl = 'http://' . ltrim($merchantSiteUrl, '/');
    }
    //	if (strpos('http://', $merchantSiteUrl) == false) {
    //		$merchantSiteUrl = 'http://' . $merchantSiteUrl;
    //	}
}
$metodForm = "";
if (strpos($merchantSiteUrl, '%3f') !== false || strpos($merchantSiteUrl, '?') !== false) {
    $metodForm = "post";
}
if (strpos($merchantSiteUrl, '?post') !== false) {
    $metodForm = "post";
    $merchantSiteUrl = str_replace("?post", "", $merchantSiteUrl);
}
?>
<style>
	body#bd{
		background-color: #ffffff;
		background-image:none;
	}
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:31,代码来源:redirect.php

示例11: array

?>
" onerror="this.onerror=null;this.src='<?php 
echo $imgError;
?>
'" /></a>
				<h4 class="com_bookingforconnector_merchantdetails-resource-name"><a class="com_bookingforconnector_resource-resource-nameAnchor" href="<?php 
echo $route;
?>
"><?php 
echo $offerName;
?>
</a></h4>

				<p class="com_bookingforconnector_merchantdetails-resource-desc">
					<?php 
echo BFCHelper::getLanguage($offer->Description, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
?>
				</p>
			</div>
			<div class="clearboth"></div>
			<div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
?>
 com_bookingforconnector_search-merchant-resource nominheight noborder">
					<div class="<?php 
echo COM_BOOKINGFORCONNECTOR_BOOTSTRAP_ROW;
?>
 ">
				<?php 
if ($offer->Price != null && $offer->Price > 0) {
    ?>
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:31,代码来源:offers_offer.php

示例12:

        if (isset($filtersEnabledMasterTypologies) && is_array($filtersEnabledMasterTypologies) && array_key_exists($masterTypology->MasterTypologyId, $filtersEnabledMasterTypologies)) {
            ?>
						<?php 
            $checked = '';
            if (isset($filtersMasterTypologies) && is_array($filtersMasterTypologies) && in_array($masterTypology->MasterTypologyId, $filtersMasterTypologies)) {
                $checked = ' checked="checked"';
            }
            ?>
						<label class="checkbox"><input type="checkbox" name="filtersMasterTypologies"  class="checkboxmastertypologies" value="<?php 
            echo $masterTypology->MasterTypologyId;
            ?>
" <?php 
            echo $checked;
            ?>
 /><?php 
            echo BFCHelper::getLanguage($masterTypology->Name, $language);
            ?>
 <span class="countvalues" style="display:none;">(<?php 
            echo $filtersEnabledMasterTypologies[$masterTypology->MasterTypologyId];
            ?>
)</label>
					<?php 
        }
        ?>
				<?php 
    }
    ?>
			</div>
		<?php 
}
?>
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:31,代码来源:default.php

示例13: onContentSearch

 function onContentSearch($text, $phrase = '', $ordering = '', $areas = null)
 {
     //If the array is not correct, return it:
     if (is_array($areas)) {
         if (!array_intersect($areas, array_keys($this->onContentSearchAreas()))) {
             return array();
         }
     }
     $section = JText::_('PLG_SEARCH_BOOKINGFORCONNECTORRESOURCE');
     //Then load the parameters of the plugin.
     $pluginParams = $this->params;
     //Now define the parameters like this:
     $limit = $pluginParams->def('search_limit', 20);
     $direction = $pluginParams->def('direction', "asc");
     //Use the function trim to delete spaces in front of or at the back of the searching terms
     $text = trim($text);
     //Return Array when nothing was filled in.
     if ($text == '') {
         return array();
     }
     $wheres = array();
     switch ($phrase) {
         //search exact
         case 'exact':
             /*$text		= $db->Quote( '%'.$db->getEscaped( $text, true ).'%', false );
             		$where 		= '(' . implode( ') OR (', $wheres2 ) . ')';*/
             break;
             //search all or any
         //search all or any
         case 'all':
         case 'any':
             //set default
         //set default
         default:
             /*
             $words 	= explode( ' ', $text );
             $wheres = array();
             foreach ($words as $word)
             {
             $word		= $db->Quote( '%'.$db->getEscaped( $word, true ).'%', false );
             $wheres2 	= array();
             $wheres2[] 	= 'LOWER(a.name) LIKE '.$word;
             $wheres[] 	= implode( ' OR ', $wheres2 );
             }
             $where = '(' . implode( ($phrase == 'all' ? ') AND (' : ') OR ('), $wheres ) . ')';
             */
             break;
     }
     //ordering of the results
     switch ($ordering) {
         //alphabetic, ascending
         case 'alpha':
             $order = 'Name';
             break;
             //oldest first
         //oldest first
         case 'oldest':
             //popular first
         //popular first
         case 'popular':
             //newest first
         //newest first
         case 'newest':
             //default setting: alphabetic, ascending
         //default setting: alphabetic, ascending
         default:
             $order = 'Name';
     }
     //replace nameofplugin
     $rows = array();
     $resources = BFCHelper::getResourcesSearch($text, 0, $limit, $order, $direction);
     $document = JFactory::getDocument();
     $language = $document->getLanguage();
     /* we have to find the itemid for the target page */
     $db = JFactory::getDBO();
     $lang = JFactory::getLanguage()->getTag();
     $uri = 'index.php?option=com_bookingforconnector&view=resource';
     $db->setQuery('SELECT id FROM #__menu WHERE link LIKE ' . $db->Quote($uri . '%') . ' AND language=' . $db->Quote($lang) . ' LIMIT 1');
     $itemId = $db->getErrorNum() ? 0 : intval($db->loadResult());
     //The 'output' of the displayed link
     foreach ($resources as $resource) {
         //$rows[$key]->href = 'index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name);
         $resourceName = BFCHelper::getLanguage($resource->Name, $language);
         $rows[] = (object) array('href' => Jroute::_('index.php?Itemid=' . $itemId . '&option=com_bookingforconnector&view=resource&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName)), 'title' => $resourceName, 'created' => null, 'section' => $section, 'text' => BFCHelper::getLanguage($resource->Description, $language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags')), 'browsernav' => '0');
     }
     //Return the search results in an array
     return $rows;
 }
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:88,代码来源:bookingforconnectorresource.php

示例14: unset

    unset($currstay->RatePlanStay->SuggestedStay);
    $currstay->CalculatedPricesDetails = $completestay->CalculatedPricesDetails;
    $currstay->AllVariations = $completestay->AllVariations;
    $currstay->DiscountVariation = $completestay->DiscountVariation;
    $currstay->SupplementVariation = $completestay->SupplementVariation;
    $staysuggested = htmlspecialchars(json_encode($currstay), ENT_COMPAT, 'UTF-8');
}
$bookingTypes = $this->MerchantBookingTypes;
$bookingTypedefault = "";
//$bookingTypesDesc ="";
$bookingTypesoptions = array();
$bookingTypesValues = array();
if (!empty($bookingTypes)) {
    $bookingTypesDescArray = array();
    foreach ($bookingTypes as $bt) {
        $currDesc = BFCHelper::getLanguage($bt->Name, $lang) . "<div class='ccdescr'>" . BFCHelper::getLanguage($bt->Description, $lang) . "</div>";
        if ($bt->AcquireCreditCardData && !empty($bt->Data)) {
            $ccimgages = explode("|", $bt->Data);
            $cCCTypeList = array();
            $currDesc .= "<div class='ccimages'>";
            foreach ($ccimgages as $ccimgage) {
                $currDesc .= '<i class="fa fa-cc-' . strtolower($ccimgage) . '" title="' . $ccimgage . '"></i>&nbsp;&nbsp;';
                $cCCTypeList[] = JHTML::_('select.option', $ccimgage, $ccimgage);
            }
            $currDesc .= "</div>";
        }
        //		if($bt->AcquireCreditCardData==1 && !BFCHelper::isUnderHTTPS() ){
        //			continue;
        //		}
        $bookingTypesoptions[] = JHTML::_('select.option', $bt->BookingTypeId . ":" . $bt->AcquireCreditCardData, $currDesc);
        $calculatedBookingType = $bt;
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:31,代码来源:form_inforequest.php

示例15: array

echo $indirizzo;
?>
</span>, <span class="postal-code "><?php 
echo $cap;
?>
</span> <span class="locality"><?php 
echo $comune;
?>
</span> <span class="region">(<?php 
echo $provincia;
?>
)</span></strong>
				</div>
				<p class="com_bookingforconnector_merchantdetails-resource-desc">
					<?php 
echo BFCHelper::getLanguage($resource->Description, 'en-gb', null, array('nomore1br' => 'nomore1br', 'ln2br' => 'ln2br', 'striptags' => 'striptags'));
?>
				</p>
			</div>
			<div class="clearboth"></div>
			<div class="row-fluid com_bookingforconnector_search-merchant-resource nominheight noborder">
					<div class="row-fluid ">
						<div class="span3 com_bookingforconnector_merchantdetails-resource-paxes minheight34 borderright">
							<?php 
if ($resource->MinCapacityPaxes == $resource->MaxCapacityPaxes) {
    ?>
								<?php 
    echo $resource->MaxCapacityPaxes;
    ?>
 <?php 
    echo 'Persons';
开发者ID:Bookingfor,项目名称:drupal-module,代码行数:31,代码来源:ajaxresources.tpl.php


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