lib/traits/elements.php
protected function setEditButtons()
    {
        global $APPLICATION;

        if (!$APPLICATION->GetShowIncludeAreas() || $this->showEditButtons === false)
        {
            return false;
        }

        $buttons = \CIBlock::GetPanelButtons(
            $this->arParams['IBLOCK_ID'],
            $this->arResult['ID'],
            $this->arParams['SECTION_ID'],
            []
        );

        $this->addIncludeAreaIcons(\CIBlock::GetComponentMenu($APPLICATION->GetPublicShowMode(), $buttons));

        if (is_array($buttons['intranet']))
        {
            Asset::getInstance()->addJs(BX_ROOT.'/js/main/utils.js');

            foreach ($buttons['intranet'] as $button)
            {
                $this->addEditButton($button);
            }
        }
    }
protected function setEditButtons()
    {
        global $APPLICATION;

        if (!$APPLICATION->GetShowIncludeAreas() || $this->showEditButtons === false)
        {
            return false;
        }

        $buttons = \CIBlock::GetPanelButtons(
            $this->arParams['IBLOCK_ID'],
            $this->arResult['ID'],
            $this->arParams['SECTION_ID'],
            []
        );

        $this->addIncludeAreaIcons(\CIBlock::GetComponentMenu($APPLICATION->GetPublicShowMode(), $buttons));

        if (is_array($buttons['intranet']))
        {
            Asset::getInstance()->addJs(BX_ROOT.'/js/main/utils.js');

            foreach ($buttons['intranet'] as $button)
            {
                $this->addEditButton($button);
            }
        }
    }
protected function setEditButtons ( ) { global $ APPLICATION ; if ( ! $ APPLICATION -> GetShowIncludeAreas ( ) || $ this -> showEditButtons === false ) { return false ; } $ buttons = \ CIBlock :: GetPanelButtons ( $ this -> arParams [ 'IBLOCK_ID' ] , $ this -> arResult [ 'ID' ] , $ this -> arParams [ 'SECTION_ID' ] , [ ] ) ; $ this -> addIncludeAreaIcons ( \ CIBlock :: GetComponentMenu ( $ APPLICATION -> GetPublicShowMode ( ) , $ buttons ) ) ; if ( is_array ( $ buttons [ 'intranet' ] ) ) { Asset :: getInstance ( ) -> addJs ( BX_ROOT . '/js/main/utils.js' ) ; foreach ( $ buttons [ 'intranet' ] as $ button ) { $ this -> addEditButton ( $ button ) ; } } }
Add to page buttons for edit elements and sections of info-block
Add to page buttons for edit elements and sections of info - block