src/Admin/Controllers/EntityManagerController.php
public function install($instanceName, $selfedit, $installMode = null, $generateDaos = null, $generatePatch = false)
    {
        if ($selfedit == 'true') {
            $this->moufManager = MoufManager::getMoufManager();
        } else {
            $this->moufManager = MoufManager::getMoufManagerHiddenInstance();
        }

        $proxy = new InstanceProxy($instanceName);

        $this->moufManager->setVariable("doctrine_".$instanceName."_generatePatch", $generatePatch);

        $fileName = $proxy->updateSchema();
        if ($generatePatch) {
            DatabasePatchInstaller::generatePatch($this->moufManager,'Doctrine patch to match DB schema with defined entities.', $instanceName, $selfedit);
        }
        if ($generateDaos) {
            $daoData = $proxy->generateDAOs();

            $em = $this->moufManager->getInstanceDescriptor($instanceName);

            foreach ($daoData as $fullClassName => $className) {
                if (!$this->moufManager->instanceExists(lcfirst($className))) {
                    $daoInstance = $this->moufManager->createInstance($fullClassName);
                    $daoInstance->setName(lcfirst($className));
                } else {
                    $daoInstance = $this->moufManager->getInstanceDescriptor(lcfirst($className));
                }
                $daoInstance->getProperty('entityManager')->setValue($em);
            }
        }

        $this->moufManager->rewriteMouf();

        if ($installMode) {
            InstallUtils::continueInstall($selfedit == 'true');
        } else {
            set_user_message("Schema and DAOs have been successfully updated.<br>
			<b>A backup dump has been generated in $fileName</b>", UserMessageInterface::SUCCESS);
            header('Location:'.ROOT_URL."ajaxinstance/?name=$instanceName&selfedit=".$selfedit);
        }
    }
public function install($instanceName, $selfedit, $installMode = null, $generateDaos = null, $generatePatch = false)
    {
        if ($selfedit == 'true') {
            $this->moufManager = MoufManager::getMoufManager();
        } else {
            $this->moufManager = MoufManager::getMoufManagerHiddenInstance();
        }

        $proxy = new InstanceProxy($instanceName);

        $this->moufManager->setVariable("doctrine_".$instanceName."_generatePatch", $generatePatch);

        $fileName = $proxy->updateSchema();
        if ($generatePatch) {
            DatabasePatchInstaller::generatePatch($this->moufManager,'Doctrine patch to match DB schema with defined entities.', $instanceName, $selfedit);
        }
        if ($generateDaos) {
            $daoData = $proxy->generateDAOs();

            $em = $this->moufManager->getInstanceDescriptor($instanceName);

            foreach ($daoData as $fullClassName => $className) {
                if (!$this->moufManager->instanceExists(lcfirst($className))) {
                    $daoInstance = $this->moufManager->createInstance($fullClassName);
                    $daoInstance->setName(lcfirst($className));
                } else {
                    $daoInstance = $this->moufManager->getInstanceDescriptor(lcfirst($className));
                }
                $daoInstance->getProperty('entityManager')->setValue($em);
            }
        }

        $this->moufManager->rewriteMouf();

        if ($installMode) {
            InstallUtils::continueInstall($selfedit == 'true');
        } else {
            set_user_message("Schema and DAOs have been successfully updated.<br>
			<b>A backup dump has been generated in $fileName</b>", UserMessageInterface::SUCCESS);
            header('Location:'.ROOT_URL."ajaxinstance/?name=$instanceName&selfedit=".$selfedit);
        }
    }
Displays the "schema generation screen".

@Action
@Logged

@param string $selfedit If true, the name of the component must be a component from the Mouf framework itself (internal use only)