Documentation

OnAdminListDisplay

void
Handler(
 object &list
);

The event OnAdminListDisplay is fired in the function CAdminList::Display() when list of elements is displayed in the administrative section. The event allows to modify a list object, specifically, to add custom group actions for the list elements, add commands to the action menu of list elements and etc.

Function parameters

Parameter Description
list Link to the CAdminList class object.

Returned value

Returned value is not used.

See Also

Examples of use

<?
AddEventHandler("main", "OnAdminListDisplay", "MyOnAdminListDisplay");
function MyOnAdminListDisplay(&$list)
{
//add custom group action
if($list->table_id == "tbl_posting")
$list->arActions["status_draft"] = "Status: Draft";
}
//process custom action
AddEventHandler("main", "OnBeforeProlog", "MyOnBeforeProlog");
function MyOnBeforeProlog()
{
if($_SERVER["REQUEST_METHOD"] == "POST" && $_POST["action"] == "status_draft" && is_array($_POST["ID"]) && $GLOBALS["APPLICATION"]->GetCurPage() == "/bitrix/admin/posting_admin.php")
{
a if($GLOBALS["APPLICATION"]->GetGroupRight("subscribe") == "W" && check_bitrix_sessid())
{
if(CModule::IncludeModule("subscribe"))
{
$cPosting = new CPosting;
foreach($_POST["ID"] as $ID)
if(($ID = intval($ID)) > 0)
$cPosting->ChangeStatus($ID, "D");
}
}
}
}
?>


© «Bitrix24», 2001-2022
Up