src/CoreBundle/Contao/Hooks/LoadDataContainer.php
private function handleNonMetaModelTable($tableName)
    {
        // Nothing to do for MetaModel tables.
        if (substr($tableName, 0, 3) === 'mm_') {
            return;
        }

        static $map;
        if (!isset($map)) {
            $map = $this->buildMap();
        }

        // No children for this table.
        if (!isset($map[$tableName])) {
            return;
        }

        $parentDCA = &$GLOBALS['TL_DCA'][$tableName];

        $this->controller->loadLanguageFile('default');
        foreach ($map[$tableName] as $metaModelTable => $inputScreen) {
            $metaModel = $this->factory->getMetaModel($metaModelTable);
            $caption   = $this->buildCaption($metaModel, $inputScreen);

            $operationName                                   = 'edit_' . $metaModel->getTableName();
            $parentDCA['list']['operations'][$operationName] = array
            (
                'label'      => &$caption,
                'href'       => 'table=' . $metaModelTable,
                'icon'       => $this->iconBuilder->getBackendIcon($inputScreen['meta']['backendicon']),
                'attributes' => 'onclick="Backend.getScrollOffset()"',
            );

            // Is the destination table a metamodel with variants?
            if ($metaModel->hasVariants()) {
                $parentDCA['list']['operations'][$operationName]['idparam'] = 'id_' . $tableName;
            } else {
                $parentDCA['list']['operations'][$operationName]['idparam'] = 'pid';
            }

            // Compatibility with DC_Table.
            if ($parentDCA['config']['dataContainer'] !== 'General') {
                $idParameter                                                        =
                    $parentDCA['list']['operations'][$operationName]['idparam'];
                $parentDCA['list']['operations'][$operationName]['button_callback'] =
                    function ($row, $href, $label, $name, $icon, $attributes, $table) use ($idParameter) {
                        return $this->buildChildOperationButton(
                            $idParameter,
                            $row['id'],
                            $href,
                            $label,
                            $name,
                            $icon,
                            $attributes,
                            $table
                        );
                    };
            }
        }
    }
private function handleNonMetaModelTable($tableName)
    {
        // Nothing to do for MetaModel tables.
        if (substr($tableName, 0, 3) === 'mm_') {
            return;
        }

        static $map;
        if (!isset($map)) {
            $map = $this->buildMap();
        }

        // No children for this table.
        if (!isset($map[$tableName])) {
            return;
        }

        $parentDCA = &$GLOBALS['TL_DCA'][$tableName];

        $this->controller->loadLanguageFile('default');
        foreach ($map[$tableName] as $metaModelTable => $inputScreen) {
            $metaModel = $this->factory->getMetaModel($metaModelTable);
            $caption   = $this->buildCaption($metaModel, $inputScreen);

            $operationName                                   = 'edit_' . $metaModel->getTableName();
            $parentDCA['list']['operations'][$operationName] = array
            (
                'label'      => &$caption,
                'href'       => 'table=' . $metaModelTable,
                'icon'       => $this->iconBuilder->getBackendIcon($inputScreen['meta']['backendicon']),
                'attributes' => 'onclick="Backend.getScrollOffset()"',
            );

            // Is the destination table a metamodel with variants?
            if ($metaModel->hasVariants()) {
                $parentDCA['list']['operations'][$operationName]['idparam'] = 'id_' . $tableName;
            } else {
                $parentDCA['list']['operations'][$operationName]['idparam'] = 'pid';
            }

            // Compatibility with DC_Table.
            if ($parentDCA['config']['dataContainer'] !== 'General') {
                $idParameter                                                        =
                    $parentDCA['list']['operations'][$operationName]['idparam'];
                $parentDCA['list']['operations'][$operationName]['button_callback'] =
                    function ($row, $href, $label, $name, $icon, $attributes, $table) use ($idParameter) {
                        return $this->buildChildOperationButton(
                            $idParameter,
                            $row['id'],
                            $href,
                            $label,
                            $name,
                            $icon,
                            $attributes,
                            $table
                        );
                    };
            }
        }
    }
Handle for non MetaModel tables - this adds the child operations.

@param string $tableName The table name.

@return void

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