protected function getAreaNameAndParentFromRelativeRecordOrDefaults($relativeUid)
{
$fluxAreaName = NULL;
$parentRecordUid = 0;
$defaultValues = $this->getDefaultValues();
if (0 > $relativeUid) {
// pasting after another element means we should try to resolve the Flux content relation
// from that element instead of GET parameters (clicked: "create new" icon after other element)
$parentRecord = $this->recordService->getSingle('tt_content', '*', abs($relativeUid));
$fluxAreaName = (string) $parentRecord['tx_flux_column'];
$parentRecordUid = (int) $parentRecord['tx_flux_parent'];
} elseif (TRUE === isset($defaultValues['tx_flux_column'])) {
// attempt to read the target Flux content area from GET parameters (clicked: "create new" icon
// in top of nested Flux content area
$fluxAreaName = (string) $defaultValues['tx_flux_column'];
$parentRecordUid = (int) $defaultValues['tx_flux_parent'];
}
return array($parentRecordUid, $fluxAreaName);
}