本文整理汇总了PHP中CBitrixComponent::setLanguageId方法的典型用法代码示例。如果您正苦于以下问题:PHP CBitrixComponent::setLanguageId方法的具体用法?PHP CBitrixComponent::setLanguageId怎么用?PHP CBitrixComponent::setLanguageId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBitrixComponent
的用法示例。
在下文中一共展示了CBitrixComponent::setLanguageId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: includeComponent
public static function includeComponent($componentName, $componentTemplate, $arParams = array(), $parentComponent = null, $arFunctionParams = array())
{
$componentRelativePath = \CComponentEngine::MakeComponentPath($componentName);
if (StrLen($componentRelativePath) <= 0) {
return False;
}
if (is_object($parentComponent)) {
if (!$parentComponent instanceof \cbitrixcomponent) {
$parentComponent = null;
}
}
$result = null;
$bComponentEnabled = !isset($arFunctionParams["ACTIVE_COMPONENT"]) || $arFunctionParams["ACTIVE_COMPONENT"] != "N";
$component = new \CBitrixComponent();
if ($component->InitComponent($componentName)) {
$obAjax = null;
if ($bComponentEnabled) {
$component->setSiteId(static::getInstance()->getSiteId());
$component->setLanguageId(static::getInstance()->getLanguageId());
$component->setSiteTemplateId(static::getInstance()->getSiteTemplateId());
$result = $component->IncludeComponent($componentTemplate, $arParams, $parentComponent);
$arThemeCss = array();
// TODO: use styles array from $component
foreach ($arThemeCss as $cssPath) {
static::getInstance()->setStyle($cssPath);
}
}
}
return $result;
}