getTableModel example


        $table = $this->Request()->getParam('tableName');

        $mapping = $this->get(TableMappingInterface::class);

        if (!$mapping->isAttributeTable($table) || !$table) {
            $this->View()->assign(['success' => false, 'message' => 'Table not supported']);

            return;
        }

        if (!$model = $mapping->getTableModel($table)) {
            $this->View()->assign(['success' => false, 'message' => 'Table has no model']);

            return;
        }

        try {
            $entityManager = $this->get(ModelManager::class);
            $entityManager->generateAttributeModels([$table]);
        } catch (Exception $e) {
            $this->View()->assign(['success' => false, 'message' => $e->getMessage()]);

            
Home | Imprint | This part of the site doesn't use cookies.