• Модуль: report
  • Путь к файлу: ~/bitrix/modules/report/lib/visualconstructor/handler/base.php
  • Класс: BitrixReportVisualConstructorHandlerBase
  • Вызов: Base::removeFormElement
public function removeFormElement(BaseFormElement $element)
{
	if ($element instanceof BaseValuable)
	{
		if (!empty($this->formElementsList[$element->getKey()]))
		{
			$configuration = $this->getConfiguration($element->getKey());
			foreach ($this->configurations as $i => $configurationFromList)
			{
				if ($configurationFromList === $configuration)
				{
					unset($this->configurations[$i]);
				}
			}
		}
	}

	foreach ($this->formElementsList  as $i => $elementFromList)
	{
		if ($element === $elementFromList)
		{
			unset($this->formElementsList[$i]);
			return true;
		}
	}
	return false;
}