403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/main/lib/grid/ui/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/main/lib/grid/ui/gridrequest.php
<?php

namespace Bitrix\Main\Grid\UI;

use Bitrix\Main\HttpRequest;

/**
 * Grid's request for `bitrix:main.ui.grid` component.
 */
class GridRequest implements \Bitrix\Main\Grid\GridRequest
{
	protected HttpRequest $request;

	/**
	 * @param HttpRequest $request
	 */
	public function __construct(HttpRequest $request)
	{
		$this->request = $request;
	}

	/**
	 * Name of request param "for all"
	 *
	 * @return string
	 */
	private function getRequestSelectedAllRowsName(): string
	{
		return 'action_all_rows_' . $this->getGridId();
	}

	#region override methods

	/**
	 * @inheritDoc
	 *
	 * @return HttpRequest
	 */
	final public function getHttpRequest(): HttpRequest
	{
		return $this->request;
	}

	/**
	 * @inheritDoc
	 *
	 * @return string|null
	 */
	public function getGridId(): ?string
	{
		return $this->request->get('grid_id');
	}

	/**
	 * @inheritDoc
	 *
	 * @return string|null
	 */
	public function getGridActionId(): ?string
	{
		return $this->request->get('grid_action');
	}

	/**
	 * @inheritDoc
	 *
	 * @return string|null
	 */
	public function getPanelActionId(): ?string
	{
		$actionButtonName = 'action_button_' . $this->getGridId();

		return $this->request->getPost($actionButtonName);
	}

	/**
	 * @inheritDoc
	 *
	 * @return string|null
	 */
	public function getRowActionId(): ?string
	{
		$actionButtonName = 'action_button_' . $this->getGridId();

		return $this->request->getPost($actionButtonName);
	}

	/**
	 * @inheritDoc
	 *
	 * @return bool
	 */
	public function isSelectedAllPanelRows(): bool
	{
		$name = $this->getRequestSelectedAllRowsName();

		return $this->request->getPost($name) === 'Y';
	}

	/**
	 * @inheritDoc
	 *
	 * @return bool
	 */
	public function isSelectedAllPanelGroupRows(): bool
	{
		$name = $this->getRequestSelectedAllRowsName();
		$value = $this->request->getPost('controls')[$name] ?? null;

		return $value === 'Y';
	}

	#endregion override methods
}

Youez - 2016 - github.com/yon3zu
LinuXploit