1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
edit_area.php
См. документацию.
1<?php
8
10
11if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
12
13IncludeModuleLangFile(__FILE__);
14
16{
19 var $includeLevel = -1;
21 var $bEditAreas = false;
22 var $bDrawIcons = false;
23
24 function __GetAreaId()
25 {
26 return implode("_", array_slice($this->includeAreaIndex, 0, $this->includeLevel+1));
27 }
28
30 {
31 $this->includeLevel++;
32 $this->includeAreaIndex[$this->includeLevel] = intval($this->includeAreaIndex[$this->includeLevel] ?? 0)+1;
33 unset($this->includeAreaIndex[$this->includeLevel+1]);
34
35 $areaId = $this->__GetAreaId();
36
37 $res = '<div id="bx_incl_area_'.$areaId.'">';
38 return $res;
39 }
40
41 function IncludeStringAfter($arIcons=false, $arParams=array())
42 {
43 $res = '';
44 $res .= $this->DrawIcons($arIcons, $arParams);
45 $res .= '</div>';
46 $areaId = $this->__GetAreaId();
47
48 if ($this->bDrawIcons)
49 $res .= '<script>if(window.BX&&BX.admin)BX.admin.setComponentBorder(\'bx_incl_area_'.$areaId.'\')</script>';
50
51 $this->includeLevel--;
52 return $res;
53 }
54
55 function DrawIcons($arIcons, $arParams=array())
56 {
57 $bStack = $this->includeLevel > (isset($GLOBALS['BX_GLOBAL_AREA_EDIT_ICON']) && $GLOBALS['BX_GLOBAL_AREA_EDIT_ICON'] ? 1 : 0);
58
59 $arJSIcons = array();
60 $arOuterIcons = array();
61 foreach ($arIcons as $arIcon)
62 {
63 if(isset($arIcon['SEPARATOR']))
64 {
65 $size = count($arJSIcons);
66 if ($size <= 0 || !isset($arJSIcons[$size-1]["SEPARATOR"]))
67 $arJSIcons[] = array('SEPARATOR' => 'Y');
68 }
69 else
70 {
71 //skip duplicate buttons
72 if (isset($arIcon["ID"]) && $arIcon["ID"] <> '')
73 {
74 if (!array_key_exists("ICONS_ID", $this->includeAreaIcons) || !is_array($this->includeAreaIcons["ICONS_ID"]))
75 $this->includeAreaIcons["ICONS_ID"] = Array($arIcon["ID"]);
76 elseif (in_array($arIcon["ID"], $this->includeAreaIcons["ICONS_ID"]))
77 continue;
78 else
79 $this->includeAreaIcons["ICONS_ID"][] = $arIcon["ID"];
80 }
81
82 $jsIcon = CEditArea::GetJSIcon($arIcon);
83
84 if ((isset($arIcon['IN_MENU']) && $arIcon['IN_MENU']) || (isset($arIcon['TYPE']) && $arIcon['TYPE'] == 'components2_props' && $bStack))
85 $arJSIcons[] = $jsIcon;
86 elseif (isset($arIcon['IN_PARAMS_MENU']) && $arIcon['IN_PARAMS_MENU'])
87 {
88 $jsIcon['TYPE'] = 'components2_submenu_item';
89 $arOuterIcons[] = $jsIcon;
90 }
91 else
92 $arOuterIcons[] = $jsIcon;
93 }
94 }
95
96 $areaId = $this->__GetAreaId();
97
98 $this->includeAreaIcons[$areaId] = array(
99 'COMPONENT' => $arParams['COMPONENT'] ?? '',
100 'DESCRIPTION' => $arParams['COMPONENT_DESCRIPTION'] ?? '',
101 'OUTER_ICONS' => $arOuterIcons,
102 'ICONS' => $arJSIcons
103 );
104
105 if ($bStack)
106 {
107 $this->bDrawIcons = false;
108 return '';
109 }
110 else
111 {
112 if (array_key_exists("ICONS_ID", $this->includeAreaIcons))
113 unset($this->includeAreaIcons["ICONS_ID"]);
114
115 $arAllOuterIcons = array();
116 $arAllInnerIcons = array();
117 foreach ($this->includeAreaIcons as $arSubIcons)
118 {
119 $arAllOuterIcons = array_merge($arAllOuterIcons, $arSubIcons['OUTER_ICONS']);
120 $arAllInnerIcons = array_merge(
121 $arAllInnerIcons,
122 array(
123 array(
124 'TEXT' => isset($arSubIcons['DESCRIPTION']['NAME']) ? ($arSubIcons['DESCRIPTION']['NAME'].' ('.$arSubIcons['COMPONENT'].')') : $arSubIcons['COMPONENT'],
125 'ICON' => 'parameters-2',
126 'MENU' => $arSubIcons['ICONS']
127 )
128 )
129 );
130 }
131
132 $arAllInnerIcons = array_reverse($arAllInnerIcons);
133
134 $arAddInnerIcons = array();
135 foreach ($arAllOuterIcons as $aIcon)
136 {
137 if (isset($aIcon['TYPE']) && $aIcon['TYPE'] == 'components2_props')
138 {
139 $arAddInnerIcons['components2_props'] = $aIcon;
140 }
141 elseif (isset($aIcon['TYPE']) && $aIcon['TYPE'] == 'components2_submenu_item')
142 {
143 $arAddInnerIcons[] = $aIcon;
144 }
145 }
146
147 if (count($arAddInnerIcons) > 1)
148 {
149 $arAddInnerIcons[] = array('SEPARATOR' => 'Y');
150 }
151
152 if (!empty($arAddInnerIcons) && !empty($arAllInnerIcons))
153 {
154 $arJSIcons = array_merge(
155 $arAllOuterIcons,
156 array(
157 array(
158 'TYPE' => 'components2_submenu',
159 'TEXT' => 'components2_submenu',
160 'ICON' => 'parameters-2',
161 'MENU' => array_merge(array_values($arAddInnerIcons), $arAllInnerIcons)
162 )
163 )
164 );
165 }
166 else
167 {
168 $arJSIcons = $arAllOuterIcons;
169 }
170
171 $arUserOptions = false;
172 if (!empty($arParams['COMPONENT_ID']))
173 {
174 $arUserOptions = CUtil::GetPopupOptions($arParams['COMPONENT_ID']);
175 }
176
177 $arJSParams = array(
178 'parent' => 'bx_incl_area_'.$areaId,
179 'id' => 'comp_'.$areaId,
180 );
181
182 if (!empty($arParams['COMPONENT_ID']))
183 {
184 $arJSParams['component_id'] = $arParams['COMPONENT_ID'];
185
186 if (is_array($arUserOptions))
187 {
188 if ($arUserOptions['pin'] === 'true' || $arParams['COMPONENT_ID'] == 'page_edit_control')
189 {
190 $arJSParams['pin'] = $arUserOptions['pin'] === 'true';
191 if ($arJSParams['pin'])
192 {
193 if ($arUserOptions['transform'])
194 $arJSParams['transform'] = ($arUserOptions['transform'] === 'true');
195 if ($arUserOptions['top']) $arJSParams['top'] = $arUserOptions['top'] == 'false' ? false : $arJSParams['top'];
196 if ($arUserOptions['left']) $arJSParams['left'] = $arUserOptions['left'] == 'false' ? false : $arUserOptions['left'];
197 }
198 }
199 }
200 }
201
202 if (isset($arParams['TOOLTIP']) && is_array($arParams['TOOLTIP']) && (!empty($arParams['TOOLTIP']['TITLE']) || !empty($arParams['TOOLTIP']['TEXT'])))
203 {
204 $arJSParams['HINT'] = array(
205 'TITLE' => $arParams['TOOLTIP']['TITLE'] ?? '',
206 'TEXT' => $arParams['TOOLTIP']['TEXT'] ?? '',
207 );
208 }
209
210 if (!empty($arJSIcons))
211 {
212 $arJSParams['menu'] = $arJSIcons;
213
214 CUtil::InitJSCore(array('admin'));
215
216 $this->bDrawIcons = true;
217
218 $res = '<script>if(window.BX)BX.ready(function() {(new BX.'.(isset($arParams['COMPONENT_ID']) && $arParams['COMPONENT_ID'] == 'page_edit_control' ? 'CPageOpener' : 'CMenuOpener').'(' . Json::encode($arJSParams) . ')).Show()});</script>';
219 }
220 else
221 {
222 $this->bDrawIcons = false;
223 $res = '';
224 }
225 $this->includeAreaIcons = array();
226 }
227
228 return $res;
229 }
230
231 function GetJSIcon($arIcon)
232 {
233 $url = $arIcon['URL'] ?? '';
234 if ($url <> '')
235 {
236 if(mb_strtolower(mb_substr($url, 0, 11)) == 'javascript:')
237 $url = mb_substr($url, 11);
238 else
239 $url = 'jsUtils.Redirect([], \''.CUtil::JSEscape($url).'\')';
240 }
241
242 $jsIcon = array(
243 'ICONCLASS' => $arIcon['ICON'] ?? '',
244 'TITLE' => $arIcon['ALT'] ?? '',
245 'TEXT' => $arIcon['TITLE'] ?? '',
246 );
247
248 if ($url)
249 $jsIcon['ONCLICK'] = $url;
250
251 if(isset($arIcon['DEFAULT']) && $arIcon['DEFAULT'] == true)
252 $jsIcon['DEFAULT'] = true;
253 if(isset($arIcon['IMAGE']))
254 $jsIcon['IMAGE'] = $arIcon['IMAGE'];
255 elseif(isset($arIcon['SRC']))
256 $jsIcon['IMAGE'] = $arIcon['SRC'];
257
258 if (!empty($arIcon['TYPE']))
259 $jsIcon['TYPE'] = $arIcon['TYPE'];
260
261 if (isset($arIcon['MENU']) && is_array($arIcon['MENU']) && !empty($arIcon['MENU']))
262 {
263 $jsIcon['MENU'] = CEditArea::GetJSIconMenu($arIcon['MENU']);
264 }
265
266 return $jsIcon;
267 }
268
269 function GetJSIconMenu($arMenu)
270 {
271 foreach ($arMenu as $k => $aMenuItem)
272 {
273 if (!empty($aMenuItem['URL']))
274 {
275 $u = $aMenuItem['URL'];
276 if(mb_strtolower(mb_substr($u, 0, 11)) == 'javascript:')
277 $u = mb_substr($u, 11);
278 else
279 $u = 'jsUtils.Redirect([], \''.CUtil::JSEscape($u).'\')';
280
281 $aMenuItem['URL'] = $aMenuItem['ACTION'] = $u;
282 }
283
284 if (isset($aMenuItem['MENU']) && is_array($aMenuItem['MENU']) && !empty($aMenuItem['MENU']))
285 $aMenuItem['MENU'] = CEditArea::GetJSIconMenu($aMenuItem['MENU']);
286
287 $arMenu[$k] = $aMenuItem;
288 }
289
290 return $arMenu;
291 }
292
293 function __GetEditAreas()
294 {
295 $res = '<script>';
296 $res_ready = '';
297 foreach ($this->arEditAreas as $areaId => $arIcons)
298 {
299 $arJSIcons = array();
300 foreach ($arIcons as $arIcon)
301 {
302 $arJSIcons[] = CEditArea::GetJSIcon($arIcon);
303 }
304
305 $arJSParams = array(
306 'parent' => $areaId,
307 'menu' => $arJSIcons
308 );
309
310 $res_ready .= '(new BX.CMenuOpener('. Json::encode($arJSParams).')).Show();'."\r\n";
311 $res_ready .= 'BX.admin.setComponentBorder(\''.CUtil::JSEscape($areaId).'\');'."\r\n";
312 }
313
314 $res .= 'if(window.BX)BX.ready(function(){'.$res_ready.'});';
315 $res .= '</script>';
316
317 echo $res;
318 }
319
320 function SetEditArea($areaId, $arIcons)
321 {
322 if (!$this->bEditAreas)
323 {
324 CUtil::InitJSCore(array('admin'));
325 AddEventHandler("main", "OnEpilog", array($this, '__GetEditAreas'));
326 $this->bEditAreas = true;
327 }
328
329 if (!isset($this->arEditAreas[$areaId]))
330 $this->arEditAreas[$areaId] = array();
331
332 $this->arEditAreas[$areaId] = array_merge($this->arEditAreas[$areaId], $arIcons);
333 }
334}
335
336class CComponentPanel
337{
339 var $component;
340 var $componentName;
341 var $componentTemplate;
342 var $parentComponent;
343 var $bComponentEnabled;
344 var $bSrcFound = false;
345 var $sSrcFile = "";
346 var $iSrcLine = 0;
347
348 public function __construct($component, $componentName, $componentTemplate, $parentComponent, $bComponentEnabled)
349 {
350 $this->component = $component;
351 $this->componentName = $componentName;
352 $this->componentTemplate = $componentTemplate;
353 $this->parentComponent = $parentComponent;
354 $this->bComponentEnabled = $bComponentEnabled;
355
356 $aTrace = Bitrix\Main\Diag\Helper::getBackTrace(2);
357
358 $io = CBXVirtualIo::GetInstance();
359
360 $this->sSrcFile = str_replace("\\", "/", $io->GetLogicalName($aTrace[1]["file"]));
361 $this->iSrcLine = intval($aTrace[1]["line"]);
362
363 if($this->iSrcLine > 0 && $this->sSrcFile <> "")
364 {
365 // try to convert absolute path to file within DOCUMENT_ROOT
366 $lowerScrFile = mb_strtolower($this->sSrcFile);
367 $docRoot = mb_strtolower(str_replace("\\", "/", realpath($_SERVER["DOCUMENT_ROOT"])));
368 if(mb_strpos($lowerScrFile, $docRoot."/") === 0)
369 {
370 //within
371 $this->sSrcFile = mb_substr($this->sSrcFile, mb_strlen($docRoot));
372 $this->bSrcFound = true;
373 }
374 else
375 {
376 //bitrix outside
377 $realBitrix = mb_strtolower(str_replace("\\", "/", realpath($_SERVER["DOCUMENT_ROOT"]."/bitrix")));
378 if(mb_strpos($lowerScrFile, mb_substr($realBitrix, 0, -6)) === 0)
379 {
380 $this->sSrcFile = mb_substr($this->sSrcFile, mb_strlen($realBitrix) - 7);
381 $this->bSrcFound = true;
382 }
383 else
384 {
385 //local outside
386 $realLocal = mb_strtolower(str_replace("\\", "/", realpath($_SERVER["DOCUMENT_ROOT"]."/local")));
387 if($realLocal && mb_strpos($lowerScrFile, mb_substr($realLocal, 0, -5)) === 0)
388 {
389 $this->sSrcFile = mb_substr($this->sSrcFile, mb_strlen($realLocal) - 6);
390 $this->bSrcFound = true;
391 }
392 }
393 }
394 }
395 }
396
397 public function GetIcons()
398 {
400 global $USER, $APPLICATION;
401
402 $arIcons = array();
403 $arPanelParams = array();
404
405 $arComponentDescription = CComponentUtil::GetComponentDescr($this->componentName);
406 $bComponentAccess = ($USER->CanDoOperation('edit_php') || $this->bSrcFound && $USER->CanDoFileOperation('fm_lpa', array(SITE_ID, $this->sSrcFile)));
407
408 if($bComponentAccess && !$this->parentComponent && $this->bSrcFound)
409 {
410 $url = $APPLICATION->GetPopupLink(
411 array(
412 'URL' => "/bitrix/admin/component_props.php?".
413 "component_name=".urlencode(CUtil::addslashes($this->componentName)). //$rel_path
414 "&component_template=".urlencode(CUtil::addslashes($this->componentTemplate)).
415 "&template_id=".urlencode(CUtil::addslashes(SITE_TEMPLATE_ID)).
416 "&lang=".urlencode(CUtil::addslashes(LANGUAGE_ID)).
417 "&src_path=".urlencode(CUtil::addslashes($this->sSrcFile)).
418 "&src_line=".$this->iSrcLine.
419 "&src_page=".urlencode(CUtil::addslashes($APPLICATION->GetCurPage())).
420 "&src_site=".urlencode(CUtil::addslashes(SITE_ID)),
421 "PARAMS" => Array("min_width" => 450)
422 )
423 );
424 $arIcons[] = array(
425 'URL'=>'javascript:'.$url,
426 'TYPE'=>'components2_props',
427 'ICON'=>"bx-context-toolbar-settings-icon",
428 'TITLE'=>GetMessage("main_incl_file_comp_param"),
429 'DEFAULT'=>true,
430 );
431
432 $aMenuItem = array(
433 "TEXT"=>(!empty($arComponentDescription["NAME"])? $arComponentDescription["NAME"] : $this->componentName),
434 "TITLE"=>GetMessage("main_comp_button_menu_title").' '.$this->componentName,
435 "ICON"=>"parameters-2",
436 "ACTION"=>$url,
437 );
438 $APPLICATION->AddPanelButtonMenu("components", $aMenuItem);
439 }
440
441 if($bComponentAccess)
442 {
443 $template = $this->component->GetTemplate();
444 if(is_null($template))
445 {
446 //the component is possibly disabled, need to init the template
447 $this->component->setTemplateName($this->componentTemplate);
448 if($this->component->InitComponentTemplate())
449 $template = $this->component->GetTemplate();
450 }
451 if(!is_null($template))
452 {
453 $urlCopy = '';
454 if($this->bSrcFound && $template->IsInTheme() == false)
455 {
456 //copy template dialog
457 $urlCopy = "/bitrix/admin/template_copy.php?".
458 "lang=".urlencode(CUtil::addslashes(LANGUAGE_ID)).
459 "&component_name=".urlencode(CUtil::addslashes($this->componentName)).
460 "&component_template=".urlencode(CUtil::addslashes($this->componentTemplate)).
461 "&template_id=".urlencode(CUtil::addslashes(SITE_TEMPLATE_ID)).
462 "&template_site_template=".urlencode(CUtil::addslashes($template->GetSiteTemplate())).
463 "&src_path=".urlencode(CUtil::addslashes($this->sSrcFile)).
464 "&src_line=".$this->iSrcLine.
465 "&src_site=".urlencode(CUtil::addslashes(SITE_ID)).
466 "&edit_file=".urlencode($template->GetPageName()).
467 "&back_path=".urlencode($_SERVER["REQUEST_URI"]);
468 $arIcons[] = array(
469 'URL'=>'javascript:'.$APPLICATION->GetPopupLink(
470 array(
471 'URL' => $urlCopy,
472 "PARAMS" => Array("min_width" => 450)
473 )
474 ),
475 'ICON'=>"copy-2",
476 'TITLE'=>GetMessage("main_comp_copy_templ"),
477 'IN_MENU' => true
478 );
479 }
480
481 if($USER->CanDoOperation('edit_php') && $template->GetSiteTemplate() <> '')
482 {
483 //edit template copied to site template
484 $arIcons[] = array(
485 'URL' => 'javascript:'.$APPLICATION->GetPopupLink(array(
486 'URL' => "/bitrix/admin/public_file_edit_src.php?site=".SITE_ID."&".'path='.urlencode($template->GetFile())."&back_url=".urlencode($_SERVER["REQUEST_URI"])."&lang=".LANGUAGE_ID,
487 'PARAMS' => array(
488 'width' => 770,
489 'height' => 470,
490 'resize' => true,
491 "dialog_type" => 'EDITOR',
492 "min_width" => 700,
493 "min_height" => 400
494 )
495 )),
496 'ICON' => 'edit-2',
497 'TITLE' => GetMessage("main_comp_edit_templ"),
498 'IN_MENU' => true
499 );
500 if($template->GetFolder() <> '')
501 {
502 if(file_exists($_SERVER["DOCUMENT_ROOT"].$template->GetFolder()."/style.css"))
503 {
504 //edit template CSS copied to site template
505 $arIcons[] = array(
506 'URL' => 'javascript:'.$APPLICATION->GetPopupLink(array(
507 'URL' => "/bitrix/admin/public_file_edit_src.php?site=".SITE_ID."&".'path='.urlencode($template->GetFolder()."/style.css")."&back_url=".urlencode($_SERVER["REQUEST_URI"])."&lang=".LANGUAGE_ID,
508 'PARAMS' => array(
509 'width' => 770,
510 'height' => 470,
511 'resize' => true,
512 "dialog_type" => 'EDITOR',
513 "min_width" => 700,
514 "min_height" => 400
515 )
516 )),
517 'ICON' => 'edit-css',
518 'TITLE' => GetMessage("main_comp_edit_css"),
519 'IN_MENU' => true
520 );
521 }
522 $bWasSep = false;
523 if(file_exists($_SERVER["DOCUMENT_ROOT"].$template->GetFolder()."/result_modifier.php"))
524 {
525 $bWasSep = true;
526 $arIcons[] = array('SEPARATOR'=>true);
527 $arIcons[] = array(
528 'URL' => 'javascript:'.$APPLICATION->GetPopupLink(array(
529 'URL' => "/bitrix/admin/public_file_edit_src.php?site=".SITE_ID."&".'path='.urlencode($template->GetFolder()."/result_modifier.php")."&back_url=".urlencode($_SERVER["REQUEST_URI"])."&lang=".LANGUAGE_ID,
530 'PARAMS' => array(
531 'width' => 770,
532 'height' => 470,
533 'resize' => true,
534 "dialog_type" => 'EDITOR',
535 "min_width" => 700,
536 "min_height" => 400
537 )
538 )),
539 'TITLE' => GetMessage("main_comp_edit_res_mod"),
540 'IN_MENU' => true
541 );
542 }
543 if(file_exists($_SERVER["DOCUMENT_ROOT"].$template->GetFolder()."/component_epilog.php"))
544 {
545 if(!$bWasSep)
546 $arIcons[] = array('SEPARATOR'=>true);
547 $arIcons[] = array(
548 'URL' => 'javascript:'.$APPLICATION->GetPopupLink(array(
549 'URL' => "/bitrix/admin/public_file_edit_src.php?site=".SITE_ID."&".'path='.urlencode($template->GetFolder()."/component_epilog.php")."&back_url=".urlencode($_SERVER["REQUEST_URI"])."&lang=".LANGUAGE_ID,
550 'PARAMS' => array(
551 'width' => 770,
552 'height' => 470,
553 'resize' => true,
554 "dialog_type" => 'EDITOR',
555 "min_width" => 700,
556 "min_height" => 400
557 )
558 )),
559 'TITLE' => GetMessage("main_comp_edit_epilog"),
560 'IN_MENU' => true
561 );
562 }
563 }
564 }
565 elseif($urlCopy <> '')
566 {
567 //copy template for future editing
568 $urlCopy .= '&system_template=Y';
569 $arIcons[] = array(
570 'URL'=>'javascript:'.$APPLICATION->GetPopupLink(
571 array(
572 'URL' => $urlCopy,
573 "PARAMS" => Array("min_width" => 450)
574 )
575 ),
576 'ICON'=>"edit-2",
577 'TITLE'=>GetMessage("main_comp_edit_templ"),
578 'ALT'=>GetMessage("main_comp_copy_title"),
579 'IN_MENU' => true
580 );
581 }
582 }
583 }
584
585 $aAddIcons = array();
586 $arPanelParams['COMPONENT'] = $this->componentName;
587 if($arComponentDescription && is_array($arComponentDescription))
588 {
589 $arPanelParams['COMPONENT_DESCRIPTION'] = $arComponentDescription;
590
591 //component bar tooltip
592 $arPanelParams['TOOLTIP'] = array(
593 'TITLE' => $arComponentDescription["NAME"],
594 'TEXT' => '('.GetMessage('main_incl_comp_component').' '.$this->componentName.')'.
595 (isset($arComponentDescription["DESCRIPTION"]) && $arComponentDescription["DESCRIPTION"] <> ""? '<br />'.$arComponentDescription["DESCRIPTION"]:'')
596 );
597
598 //clear cache
599 if(array_key_exists("CACHE_PATH", $arComponentDescription) && $USER->CanDoOperation('cache_control'))
600 {
601 if($arComponentDescription["CACHE_PATH"] <> '')
602 {
603 $arIcons[] = array(
604 "URL" => "javascript:jsComponentUtils.ClearCache('component_name=".urlencode(CUtil::addslashes($this->componentName))."&site_id=".SITE_ID."&".bitrix_sessid_get()."');",
605 "ICON" => "del-cache",
606 "TITLE" => GetMessage("MAIN_BX_COMPONENT_CACHE_CLEAR"),
607 'IN_MENU' => true,
608 );
609 $APPLICATION->aCachedComponents[] = $this->componentName;
610 }
611 }
612
613 //additional buttons from component description
614 if(array_key_exists("AREA_BUTTONS", $arComponentDescription))
615 {
616 $componentRelativePath = CComponentEngine::MakeComponentPath($this->componentName);
617 $localPath = getLocalPath("components".$componentRelativePath);
618 foreach($arComponentDescription["AREA_BUTTONS"] as $value)
619 {
620 if (array_key_exists("SRC", $value))
621 $value["SRC"] = $localPath.$value["SRC"];
622 $aAddIcons[] = $value;
623 }
624 }
625 }
626
627 if(!empty($arIcons) && !empty($aAddIcons))
628 $arIcons[] = array("SEPARATOR"=>true);
629 $arIcons = array_merge($arIcons, $aAddIcons);
630
631 $aAddIcons = $this->component->GetIncludeAreaIcons();
632
633 if(!empty($arIcons) && !empty($aAddIcons))
634 $arIcons[] = array("SEPARATOR"=>true);
635 $arIcons = array_merge($arIcons, $aAddIcons);
636
637 // enable/disable menu item
638 if($bComponentAccess && !$this->parentComponent && $this->bSrcFound)
639 {
640 if(!empty($arIcons))
641 $arIcons[] = array("SEPARATOR"=>true);
642 $arIcons[] = array(
643 "URL" => "javascript:jsComponentUtils.EnableComponent('component_name=".urlencode(CUtil::addslashes($this->componentName)). //$rel_path
644 "&lang=".urlencode(CUtil::addslashes(LANGUAGE_ID)).
645 "&src_path=".urlencode(CUtil::addslashes($this->sSrcFile)).
646 "&src_line=".$this->iSrcLine.
647 "&src_site=".urlencode(CUtil::addslashes(SITE_ID)).
648 '&active='.($this->bComponentEnabled? 'N':'Y').
649 '&'.bitrix_sessid_get()."');",
650 "TITLE" => ($this->bComponentEnabled? GetMessage("main_comp_disable"):GetMessage("main_comp_enable")),
651 "ALT" => ($this->bComponentEnabled? GetMessage("main_comp_disable_title"):GetMessage("main_comp_enable_title")),
652 'IN_MENU' => true,
653 );
654 }
655
656 if($this->bSrcFound)
657 $arPanelParams['COMPONENT_ID'] = md5($arPanelParams['COMPONENT'].'|'.$this->sSrcFile.':'.$this->iSrcLine);
658
659 return array("icons"=>$arIcons, "parameters"=>$arPanelParams);
660 }
661}
$arParams
Определения access_dialog.php:21
change_password_forgot_link login popup forget pas AUTH_GOTO_FORGOT_FORM login btn wrap change_password_button login popup link login popup return auth javascript
Определения change_password.php:57
Определения json.php:9
Определения edit_area.php:16
$bEditAreas
Определения edit_area.php:21
$arEditAreas
Определения edit_area.php:20
DrawIcons($arIcons, $arParams=array())
Определения edit_area.php:55
$includeAreaIndex
Определения edit_area.php:17
IncludeStringAfter($arIcons=false, $arParams=array())
Определения edit_area.php:41
__GetEditAreas()
Определения edit_area.php:293
$bDrawIcons
Определения edit_area.php:22
IncludeStringBefore()
Определения edit_area.php:29
__GetAreaId()
Определения edit_area.php:24
$includeAreaIcons
Определения edit_area.php:18
$includeLevel
Определения edit_area.php:19
hidden PROPERTY[<?=$propertyIndex?>][CODE]<?=htmlspecialcharsEx( $propertyCode)?> height
Определения file_new.php:759
bx popup label bx width30 PAGE_NEW_MENU_NAME text width
Определения file_new.php:677
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
bx_acc_lim_group_list limitGroupList[] multiple<?=$group[ 'ID']?> ID selected margin top
Определения file_new.php:657
hidden mSiteList<?=htmlspecialcharsbx(serialize( $siteList))?><?=htmlspecialcharsbx( $siteList[ $j]["ID"])?> _Propery<? if(((COption::GetOptionString( $module_id, "different_set", "N")=="Y") &&( $j !=0))||(COption::GetOptionString( $module_id, "different_set", "N")=="N")) echo "display: none;"?> top adm detail content cell l top adm detail content cell r heading center center ID left
Определения options.php:768
$res
Определения filter_act.php:7
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
Определения tools.php:3778
die
Определения quickway.php:367
lang
Определения options.php:182
path
Определения template_copy.php:201
$url
Определения iframe.php:7