• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/composite/internals/automaticarea.php
  • Класс: BitrixMainCompositeInternalsAutomaticArea
  • Вызов: AutomaticArea::end
public function end()
{
	if (!$this->started)
	{
		return false;
	}

	$isComponentAdapted =
		$this->component->getRealFrameMode() !== null ||
		($this->component->__template !== null && $this->component->__template->getRealFrameMode() !== null);

	if ($isComponentAdapted)
	{
		ob_end_flush();
	}
	else
	{
		$stub = ob_get_contents();
		ob_end_clean();

		$frame = new StaticArea($this->component->randString());

		if ($this->getFrameType() === "DYNAMIC_WITH_STUB")
		{
			$frame->setStub($stub);
		}
		elseif ($this->getFrameType() === "DYNAMIC_WITH_STUB_LOADING")
		{
			$frame->setStub('
'); } $frame->startDynamicArea(); echo $stub; $frame->finishDynamicArea(); } $this->started = false; static::$currentArea = null; return true; }