Documentation

OnPanelCreate

handler function();
The event OnPanelCreate is called at the moment of data collection to build the control panel in the public section of site. Usually the purpose of this event handler is to add your own buttons to the control panel.

Parameters

No parameters.

See Also

  • CMain::AddPanelButton
  • CMain::ShowPanel
  • Events
  • Example of handler function:

    <?
    // file /bitrix/php_interface/init.php
    // register the handler
    AddEventHandler("main", "OnPanelCreate", Array("MyClass", "OnPanelCreateHandler"));
    class MyClass { // add button to the control panel public static function OnPanelCreateHandler() { global $APPLICATION; $APPLICATION->AddPanelButton(array( "HREF" => "/bitrix/admin/my_page.php", // button link "SRC" => "/bitrix/images/my_module_id/button_image.gif", // button image "ALT" => "Button tooltip message", "MAIN_SORT" => 300, "SORT" => 10 )); } /* Now when control panel displays our button as well */ } ?>


    © «Bitrix24», 2001-2024
    Up