• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/grid/panel/snippet.php
  • Класс: BitrixMainGridPanelSnippet
  • Вызов: Snippet::getForAllCheckbox
public function getForAllCheckbox()
{
	if (!is_array($this->forAllCheckbox))
	{
		$onchange = new Onchange();
		$onchange->addAction(array("ACTION" => Actions::CALLBACK, "DATA" => array(array("JS" => "Grid.confirmForAll()"))));

		$checkbox = new Checkbox();
		$checkbox->setId(DefaultValue::FOR_ALL_CHECKBOX_ID);
		$checkbox->setOnchange($onchange);
		$checkbox->setName(DefaultValue::FOR_ALL_CHECKBOX_NAME);
		$checkbox->setValue(DefaultValue::FOR_ALL_CHECKBOX_VALUE);
		$checkbox->setClass(DefaultValue::FOR_ALL_CHECKBOX_CLASS);
		$this->forAllCheckbox = $checkbox->toArray();
	}

	return $this->forAllCheckbox;
}