core-bundle/src/Resources/contao/library/Contao/Widget.php
protected function getPost($strKey)
	{
		if (\is_callable($this->inputCallback))
		{
			return \call_user_func($this->inputCallback);
		}

		if ($this->useRawRequestData === true)
		{
			/** @var Request $request */
			$request = System::getContainer()->get('request_stack')->getCurrentRequest();

			return $request->request->get($strKey);
		}

		$strMethod = $this->allowHtml ? 'postHtml' : 'post';

		if ($this->preserveTags)
		{
			$strMethod = 'postRaw';
		}

		// Support arrays (thanks to Andreas Schempp)
		$arrParts = explode('[', str_replace(']', '', $strKey));
		$varValue = Input::$strMethod(array_shift($arrParts), $this->decodeEntities);

		foreach ($arrParts as $part)
		{
			if (!\is_array($varValue))
			{
				break;
			}

			$varValue = $varValue[$part];
		}

		return $varValue;
	}
protected function getPost($strKey)
	{
		if (\is_callable($this->inputCallback))
		{
			return \call_user_func($this->inputCallback);
		}

		if ($this->useRawRequestData === true)
		{
			/** @var Request $request */
			$request = System::getContainer()->get('request_stack')->getCurrentRequest();

			return $request->request->get($strKey);
		}

		$strMethod = $this->allowHtml ? 'postHtml' : 'post';

		if ($this->preserveTags)
		{
			$strMethod = 'postRaw';
		}

		// Support arrays (thanks to Andreas Schempp)
		$arrParts = explode('[', str_replace(']', '', $strKey));
		$varValue = Input::$strMethod(array_shift($arrParts), $this->decodeEntities);

		foreach ($arrParts as $part)
		{
			if (!\is_array($varValue))
			{
				break;
			}

			$varValue = $varValue[$part];
		}

		return $varValue;
	}
Find and return a $_POST variable

@param string $strKey The variable name

@return mixed The variable value