src/CoreBundle/Contao/Hooks/LoadDataContainer.php
private function buildCaption($metaModel, $inputScreen): array
    {
        $caption = [
            sprintf($GLOBALS['TL_LANG']['MSC']['metamodel_edit_as_child']['label'], $metaModel->getName()),
            ''
        ];

        foreach ($inputScreen['label'] as $langCode => $label) {
            if ($label !== '' && $langCode === $GLOBALS['TL_LANGUAGE']) {
                $caption = [
                    $label,
                    $inputScreen['description'][$langCode]
                ];
            }
        }

        return $caption;
    }
private function buildCaption($metaModel, $inputScreen): array
    {
        $caption = [
            sprintf($GLOBALS['TL_LANG']['MSC']['metamodel_edit_as_child']['label'], $metaModel->getName()),
            ''
        ];

        foreach ($inputScreen['label'] as $langCode => $label) {
            if ($label !== '' && $langCode === $GLOBALS['TL_LANGUAGE']) {
                $caption = [
                    $label,
                    $inputScreen['description'][$langCode]
                ];
            }
        }

        return $caption;
    }
Build the caption for a table.

@param IMetaModel $metaModel   The MetaModel to build the caption for.
@param array      $inputScreen The input screen information.

@return array

@SuppressWarnings(PHPMD.Superglobals)
@SuppressWarnings(PHPMD.CamelCaseVariableName)