1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
base.php
См. документацию.
1<?php
2
4
7use CMain;
8
9abstract class Base extends HttpResponse
10{
11 abstract protected function renderContent(): void;
12
13 protected function __construct(
14 bool $withSiteTemplate,
15 )
16 {
17 parent::__construct();
18
19 $this->fillContent($withSiteTemplate);
20 }
21
22 final protected function fillContent(bool $withSiteTemplate): void
23 {
24 global $APPLICATION;
25
29
30 $APPLICATION->RestartBuffer();
31
32 if ($withSiteTemplate)
33 {
34 $this->includeHeader();
35 }
36 else
37 {
38 $APPLICATION->ShowAjaxHead();
39 }
40
41 $this->renderContent();
42
43 if ($withSiteTemplate)
44 {
45 $this->includeFooter();
46 }
47
48 $content = $APPLICATION->EndBufferContentMan();
49
50 $this->setContent($content);
51 }
52
53 final protected function includeHeader(): void
54 {
55 require Application::getDocumentRoot() . '/bitrix/modules/main/include/prolog_after.php';
56 }
57
58 final protected function includeFooter(): void
59 {
60 require Application::getDocumentRoot() . '/bitrix/modules/main/include/epilog_before.php';
61 }
62}
global $APPLICATION
Определения include.php:80
static getDocumentRoot()
Определения application.php:736
__construct(bool $withSiteTemplate,)
Определения base.php:13
setContent($content)
Определения response.php:31
$content
Определения commerceml.php:144