core-bundle/src/Resources/contao/drivers/DC_Table.php
public function initPicker(PickerInterface $picker)
	{
		$attributes = parent::initPicker($picker);

		if (null === $attributes)
		{
			return null;
		}

		// Predefined node set (see #3563)
		if (isset($attributes['rootNodes']))
		{
			$blnHasSorting = $this->Database->fieldExists('sorting', $this->strTable);
			$arrRoot = $this->eliminateNestedPages((array) $attributes['rootNodes'], $this->strTable, $blnHasSorting);

			// Calculate the intersection of the root nodes with the mounted nodes (see #1001)
			if (!empty($this->root) && $arrRoot != $this->root)
			{
				$arrRoot = $this->eliminateNestedPages(
					array_intersect(
						array_merge($arrRoot, $this->Database->getChildRecords($arrRoot, $this->strTable)),
						array_merge($this->root, $this->Database->getChildRecords($this->root, $this->strTable))
					),
					$this->strTable,
					$blnHasSorting
				);
			}

			$this->root = $arrRoot;
		}

		if (isset($attributes['preserveRecord']))
		{
			list($table, $id) = explode('.', $attributes['preserveRecord']);

			if ($table == $this->strTable)
			{
				$this->intPreserveRecord = $id;
			}
		}

		return $attributes;
	}
public function initPicker(PickerInterface $picker)
	{
		$attributes = parent::initPicker($picker);

		if (null === $attributes)
		{
			return null;
		}

		// Predefined node set (see #3563)
		if (isset($attributes['rootNodes']))
		{
			$blnHasSorting = $this->Database->fieldExists('sorting', $this->strTable);
			$arrRoot = $this->eliminateNestedPages((array) $attributes['rootNodes'], $this->strTable, $blnHasSorting);

			// Calculate the intersection of the root nodes with the mounted nodes (see #1001)
			if (!empty($this->root) && $arrRoot != $this->root)
			{
				$arrRoot = $this->eliminateNestedPages(
					array_intersect(
						array_merge($arrRoot, $this->Database->getChildRecords($arrRoot, $this->strTable)),
						array_merge($this->root, $this->Database->getChildRecords($this->root, $this->strTable))
					),
					$this->strTable,
					$blnHasSorting
				);
			}

			$this->root = $arrRoot;
		}

		if (isset($attributes['preserveRecord']))
		{
			list($table, $id) = explode('.', $attributes['preserveRecord']);

			if ($table == $this->strTable)
			{
				$this->intPreserveRecord = $id;
			}
		}

		return $attributes;
	}
{@inheritdoc}