1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс CBitrixComponentTemplate

Открытые члены

 __construct ()
 GetName ()
 GetPageName ()
 GetFile ()
 GetFolder ()
 GetSiteTemplate ()
 IsInTheme ()
 setLanguageId ($languageId)
 getLanguageId ()
 GetCachedData ()
 ApplyCachedData ($arData)
 InitTemplateEngines ($arTemplateEngines=[])
 Init (&$component, $siteTemplate=false, $customTemplatePath="")
 __SearchTemplateFile ($path, $fileName)
 hasTemplate ()
 hasTemplatePage (string $templatePage)
 generatePossibleTemplatePath ()
 __SearchTemplate ($customTemplatePath="")
 __IncludePHPTemplate (&$arResult, &$arParams, $parentTemplateFolder="")
 IncludeTemplate (&$arResult)
 IncludeLangFile ($relativePath="", $lang=false, $return=false)
 __IncludeMutatorFile (&$arResult, &$arParams)
 __IncludeCSSFile ()
 __IncludeJSFile ()
 __GetTemplateExtension ($templateName)
 __GetTemplateEngine ()
 SetViewTarget ($target, $pos=500)
 EndViewTarget ()
 AddEditAction ($entryId, $editLink, $editTitle=false, $arParams=[])
 AddDeleteAction ($entryId, $deleteLink, $deleteTitle=false, $arParams=[])
 GetEditAreaId ($entryId)
 randString ($length=6)
 setFrameMode ($mode)
 getFrameMode ()
 getRealFrameMode ()
 createFrame ($id=null, $autoContainer=true)
 addExternalCss ($cssPath)
 addExternalJs ($jsPath)
 getComponent ()

Открытые статические члены

static CheckName ($name)

Поля данных

 $__name = ""
 $__page = ""
 $__engineID = ""
 $__file = ""
 $__fileAlt = ""
 $__folder = ""
 $__siteTemplate = ""
 $__templateInTheme = false
 $__hasCSS = null
 $__hasJS = null
 $__component = null
 $__bInited = false

Подробное описание

См. определение в файле component_template.php строка 23

Конструктор(ы)

◆ __construct()

__construct ( )

См. определение в файле component_template.php строка 46

Методы

◆ __GetTemplateEngine()

__GetTemplateEngine ( )
Возвращает
void

См. определение в файле component_template.php строка 1094

◆ __GetTemplateExtension()

__GetTemplateExtension ( $templateName)
Аргументы
string$templateNameFile name.
Возвращает
string

См. определение в файле component_template.php строка 1083

◆ __IncludeCSSFile()

__IncludeCSSFile ( )
Возвращает
void

@global CMain $APPLICATION

См. определение в файле component_template.php строка 1028

◆ __IncludeJSFile()

__IncludeJSFile ( )
Возвращает
void

@global CMain $APPLICATION

См. определение в файле component_template.php строка 1055

◆ __IncludeMutatorFile()

__IncludeMutatorFile ( & $arResult,
& $arParams )
Аргументы
array&$arResult
array&$arParams
Возвращает
void

@noinspection PhpUnusedLocalVariableInspection

См. определение в файле component_template.php строка 1003

◆ __IncludePHPTemplate()

__IncludePHPTemplate ( & $arResult,
& $arParams,
$parentTemplateFolder = "" )

Executes template.php via include function.

Requires Init call before usage.

Аргументы
array&$arResultResult of the component calculations.
array&$arParamsParameters of the component call.
string$parentTemplateFolderParent template.
Возвращает
false|void
Исключения

Bitrix\Main\NotSupportedException

См. также
CBitrixComponentTemplate::Init

@noinspection PhpUnusedLocalVariableInspection

@noinspection PhpUnusedLocalVariableInspection

@noinspection PhpUnusedLocalVariableInspection

@noinspection PhpUnusedLocalVariableInspection

@noinspection PhpUnusedLocalVariableInspection

См. определение в файле component_template.php строка 810

◆ __SearchTemplate()

__SearchTemplate ( $customTemplatePath = "")

Search template by its name in various locations.

  1. /local/templates/<site template>/components/<parent template>/<component path>/
  2. /local/templates/.default/components/<parent template>/<component path>/
  3. /local/components/<parent template>/<component path>/
  4. /local/templates/<site template>/components/<component path>/
  5. /local/templates/.default/components/<component path>/
  6. /local/components/<component path>/
  7. /<BX_PERSONAL_ROOT>/templates/<site template>/components/<parent template>/<component path>/
  8. /<BX_PERSONAL_ROOT>/templates/.default/components/<parent template>/<component path>/
  9. /bitrix/components/<parent template>/<component path>/
  10. /<BX_PERSONAL_ROOT>/templates/<site template>/components/<component path>/
  11. /<BX_PERSONAL_ROOT>/templates/.default/components/<component path>/
  12. /bitrix/components/<component path>/
Аргументы
string$customTemplatePath
Возвращает
bool

См. определение в файле component_template.php строка 664

◆ __SearchTemplateFile()

__SearchTemplateFile ( $path,
$fileName )

Search file by its path and name without extention.

Аргументы
string$pathDirectory.
string$fileNameFile name (without extention).
Возвращает
false|string

См. определение в файле component_template.php строка 479

◆ AddDeleteAction()

AddDeleteAction ( $entryId,
$deleteLink,
$deleteTitle = false,
$arParams = [] )

Shows menu with delete action in edit mode.

['CONFIRM'] = false - disable confirm; $arParams['CONFIRM'] = 'Text' - confirm with custom text; no $arParams['CONFIRM'] at all - confirm with default text

Аргументы
string$entryIdEntry identifier. prefix like 'USER' needed only in case when template has two or more lists of different editable entities.
string$deleteLinkDelete action link, Should be set in a component.
false | string$deleteTitleButton caption.
array$arParamsAdditional parameters.
Возвращает
void
См. также
CBitrixcomponentTemplate::GetEditAreaId

См. определение в файле component_template.php строка 1218

◆ AddEditAction()

AddEditAction ( $entryId,
$editLink,
$editTitle = false,
$arParams = [] )

Shows menu with edit action in edit mode. $this->AddEditAction( 'USER'.$arUser['ID'], $arUser['EDIT_LINK'], GetMessage('INTR_ISP_EDIT_USER'), array( 'WINDOW' => array("width"=>780, "height"=>500), // popup params 'ICON' => 'bx-context-toolbar-edit-icon' // icon css 'SRC' => '/bitrix/images/myicon.gif' // icon image ) );

Аргументы
string$entryIdEntry identifier. prefix like 'USER' needed only in case when template has two or more lists of different editable entities.
string$editLinkEdit form link, Should be set in a component. Will be opened in js popup.
false | string$editTitleButton caption.
array$arParamsAdditional parameters.
Возвращает
void
См. также
CBitrixcomponentTemplate::GetEditAreaId

См. определение в файле component_template.php строка 1197

◆ addExternalCss()

addExternalCss ( $cssPath)

Shows css file in the head of html. Supports caching.

Аргументы
string$cssPathPath to css file.
Возвращает
void
См. также
CMain::SetAdditionalCSS

@global CMain $APPLICATION

См. определение в файле component_template.php строка 1342

◆ addExternalJs()

addExternalJs ( $jsPath)

Shows js file in the head of html. Supports caching.

Аргументы
string$jsPathPath to js file.
Возвращает
void
См. также
CMain::AddHeadScript

@global CMain $APPLICATION

См. определение в файле component_template.php строка 1364

◆ ApplyCachedData()

ApplyCachedData ( $arData)

Performs actions on cached hit.

Аргументы
array$arData
Возвращает
void
См. также
CBitrixComponentTemplate::GetCachedData

@global CMain $APPLICATION

См. определение в файле component_template.php строка 263

◆ CheckName()

CheckName ( $name)
static

Checks the template name for correctness. Letters, digits, minus, underscore and dots are allowed.

Аргументы
string$nameName of the template.
Возвращает
boolean

См. определение в файле component_template.php строка 466

◆ createFrame()

createFrame ( $id = null,
$autoContainer = true )

Returns new frame helper object to work with composite frame.

$frame = $this->createFrame()->begin(""); echo "10@".(time()+15); $frame->end();

Аргументы
string$id
bool$autoContainer
Возвращает
Bitrix\Main\Composite\BufferArea
См. также
Bitrix\Main\Composite\BufferArea

См. определение в файле component_template.php строка 1314

◆ EndViewTarget()

EndViewTarget ( )

Ends special output which will be showed by $APPLICATION->ShowViewContent.

Возвращает
void
См. также
CMain::ShowViewContent
CBitrixcomponentTemplate::SetViewTarget

@global CMain $APPLICATION

См. определение в файле component_template.php строка 1146

◆ generatePossibleTemplatePath()

generatePossibleTemplatePath ( )
Возвращает
array

См. определение в файле component_template.php строка 551

◆ GetCachedData()

GetCachedData ( )

Returns data to be stored in the component cache.

Requires Init call before usage.

Возвращает
null|array
См. также
CBitrixComponentTemplate::Init
CBitrixComponentTemplate::ApplyCachedData

См. определение в файле component_template.php строка 203

◆ getComponent()

getComponent ( )

A bit more civilised method of getting the parent component.

Возвращает
CBitrixComponent

См. определение в файле component_template.php строка 1381

◆ GetEditAreaId()

GetEditAreaId ( $entryId)

Returns identifier to mark an html element as a container for highlight.

<tr id="&lt;?=$this-&gt;GetEditAreaId('USER'.$arUser['ID']);?&gt;">

Аргументы
$entryId
Возвращает
string
См. также
CBitrixcomponentTemplate::AddEditAction

См. определение в файле component_template.php строка 1235

◆ GetFile()

GetFile ( )

Returns path to the template file within DOCUMENT_ROOT.

Requires Init call before usage.

Возвращает
null|string
См. также
CBitrixComponentTemplate::Init

См. определение в файле component_template.php строка 102

◆ GetFolder()

GetFolder ( )

Returns path to the template folder within DOCUMENT_ROOT.

Requires Init call before usage.

Возвращает
null|string
См. также
CBitrixComponentTemplate::Init

См. определение в файле component_template.php строка 121

◆ getFrameMode()

getFrameMode ( )

Returns frame mode

Возвращает
bool

См. определение в файле component_template.php строка 1272

◆ getLanguageId()

getLanguageId ( )

Returns template language.

Возвращает
string
См. также
CBitrixcomponentTemplate::setLanguageId

См. определение в файле component_template.php строка 188

◆ GetName()

GetName ( )

Returns name of the template.

Requires Init call before usage.

Возвращает
null|string
См. также
CBitrixComponentTemplate::Init

См. определение в файле component_template.php строка 64

◆ GetPageName()

GetPageName ( )

Returns template page.

Requires Init call before usage.

Возвращает
null|string
См. также
CBitrixComponentTemplate::Init

См. определение в файле component_template.php строка 83

◆ getRealFrameMode()

getRealFrameMode ( )

См. определение в файле component_template.php строка 1294

◆ GetSiteTemplate()

GetSiteTemplate ( )

Returns site template name.

Requires Init call before usage.

Возвращает
null|string
См. также
CBitrixComponentTemplate::Init

См. определение в файле component_template.php строка 140

◆ hasTemplate()

hasTemplate ( )

Checking existence of the template

Возвращает
bool

См. определение в файле component_template.php строка 512

◆ hasTemplatePage()

hasTemplatePage ( string $templatePage)

Checking existence of the template page

Аргументы
string$templatePage
Возвращает
bool

См. определение в файле component_template.php строка 530

◆ IncludeLangFile()

IncludeLangFile ( $relativePath = "",
$lang = false,
$return = false )

Includes template language file.

Аргументы
string$relativePath
false | string$lang
boolean$return
Возвращает
array

См. определение в файле component_template.php строка 966

◆ IncludeTemplate()

IncludeTemplate ( & $arResult)

Executes template using appropriate template engine.

Requires Init call before usage.

Аргументы
array&$arResult
Возвращает
false|void
См. также
CBitrixComponentTemplate::Init

См. определение в файле component_template.php строка 890

◆ Init()

Init ( & $component,
$siteTemplate = false,
$customTemplatePath = "" )

Have to be called before any template usage. Returns true on success.

Аргументы
CBitrixComponent$componentParent component.
boolean | string$siteTemplateSite template name.
string$customTemplatePathAdditional path to look for template in.
Возвращает
boolean

См. определение в файле component_template.php строка 390

◆ InitTemplateEngines()

InitTemplateEngines ( $arTemplateEngines = [])

Called automatically on first usage of related functions.

Аргументы
array$arTemplateEnginesArray of engines to add.
Возвращает
void

См. определение в файле component_template.php строка 349

◆ IsInTheme()

IsInTheme ( )

Returns true if template belongs to another template of a complex component.

Requires Init call before usage.

Возвращает
null|boolean
См. также
CBitrixComponentTemplate::Init

См. определение в файле component_template.php строка 159

◆ randString()

randString ( $length = 6)

Function returns next pseudo random value.

Аргументы
int$length
Возвращает
string
См. также
\Bitrix\Main\Type\RandomSequencerandString

См. определение в файле component_template.php строка 1248

◆ setFrameMode()

setFrameMode ( $mode)

Marks a template as capable of composite mode.

Аргументы
bool$mode
Возвращает
void

См. определение в файле component_template.php строка 1260

◆ setLanguageId()

setLanguageId ( $languageId)

Sets template language identifier.

Аргументы
string$languageId
Возвращает
void

См. определение в файле component_template.php строка 176

◆ SetViewTarget()

SetViewTarget ( $target,
$pos = 500 )

Begins special output which will be showed by $APPLICATION->ShowViewContent.

Аргументы
string$targetCode name of the area.
integer$posSort index.
Возвращает
void
См. также
CMain::ShowViewContent
CBitrixcomponentTemplate::EndViewTarget

См. определение в файле component_template.php строка 1125

Поля

◆ $__bInited

$__bInited = false

См. определение в файле component_template.php строка 37

◆ $__component

$__component = null

См. определение в файле component_template.php строка 36

◆ $__engineID

$__engineID = ""

См. определение в файле component_template.php строка 27

◆ $__file

$__file = ""

См. определение в файле component_template.php строка 28

◆ $__fileAlt

$__fileAlt = ""

См. определение в файле component_template.php строка 29

◆ $__folder

$__folder = ""

См. определение в файле component_template.php строка 30

◆ $__hasCSS

$__hasCSS = null

См. определение в файле component_template.php строка 33

◆ $__hasJS

$__hasJS = null

См. определение в файле component_template.php строка 34

◆ $__name

$__name = ""

См. определение в файле component_template.php строка 25

◆ $__page

$__page = ""

См. определение в файле component_template.php строка 26

◆ $__siteTemplate

$__siteTemplate = ""

См. определение в файле component_template.php строка 31

◆ $__templateInTheme

$__templateInTheme = false

См. определение в файле component_template.php строка 32


Объявления и описания членов класса находятся в файле: