src/Admin/Controllers/EntityManagerController.php
public function defaultAction($name = null, $selfedit = 'false', $installMode = null)
    {
        $this->selfedit = $selfedit;
        $this->installMode = $installMode;
        $name = $name ? $name : 'entityManager';

        $this->instanceName = $name;

        if ($selfedit == 'true') {
            $this->moufManager = MoufManager::getMoufManager();
        } else {
            $this->moufManager = MoufManager::getMoufManagerHiddenInstance();
        }

        $classNameMapper = ClassNameMapper::createFromComposerFile(__DIR__.'/../../../../../../composer.json');
        $managedNamespaces = $classNameMapper->getManagedNamespaces();

        $this->autoloadDetected = true;
        if ($this->moufManager->instanceExists($name)) {
            $instance = $this->moufManager->getInstanceDescriptor($name);
            $this->entitiesNamespace = $instance->getSetterProperty('setEntitiesNamespace')->getValue();
            $this->proxyNamespace = $instance->getSetterProperty('setProxyNamespace')->getValue();
            $this->daoNamespace = $instance->getSetterProperty('setDaoNamespace')->getValue();
        } else {
            if ($managedNamespaces) {
                $rootNamespace = $classNameMapper->getManagedNamespaces()[0];
                $this->entitiesNamespace = $rootNamespace."Model\\Entities";
                $this->proxyNamespace = $rootNamespace."Model\\Proxies";
                $this->daoNamespace = $rootNamespace."Model\\DAOs";
            } else {
                $this->autoloadDetected = false;
                $this->entitiesPath = 'src/path_to_entities';
                $this->proxyDir = 'src/path_to_proxies';
                $this->proxyNamespace = "YOUR_APP_NAMESPACE\\PATH\\TO\\PROXIES";
            }
        }

        $this->contentBlock->addFile(__DIR__.'/../views/install.php', $this);
        $this->template->toHtml();
    }
public function defaultAction($name = null, $selfedit = 'false', $installMode = null)
    {
        $this->selfedit = $selfedit;
        $this->installMode = $installMode;
        $name = $name ? $name : 'entityManager';

        $this->instanceName = $name;

        if ($selfedit == 'true') {
            $this->moufManager = MoufManager::getMoufManager();
        } else {
            $this->moufManager = MoufManager::getMoufManagerHiddenInstance();
        }

        $classNameMapper = ClassNameMapper::createFromComposerFile(__DIR__.'/../../../../../../composer.json');
        $managedNamespaces = $classNameMapper->getManagedNamespaces();

        $this->autoloadDetected = true;
        if ($this->moufManager->instanceExists($name)) {
            $instance = $this->moufManager->getInstanceDescriptor($name);
            $this->entitiesNamespace = $instance->getSetterProperty('setEntitiesNamespace')->getValue();
            $this->proxyNamespace = $instance->getSetterProperty('setProxyNamespace')->getValue();
            $this->daoNamespace = $instance->getSetterProperty('setDaoNamespace')->getValue();
        } else {
            if ($managedNamespaces) {
                $rootNamespace = $classNameMapper->getManagedNamespaces()[0];
                $this->entitiesNamespace = $rootNamespace."Model\\Entities";
                $this->proxyNamespace = $rootNamespace."Model\\Proxies";
                $this->daoNamespace = $rootNamespace."Model\\DAOs";
            } else {
                $this->autoloadDetected = false;
                $this->entitiesPath = 'src/path_to_entities';
                $this->proxyDir = 'src/path_to_proxies';
                $this->proxyNamespace = "YOUR_APP_NAMESPACE\\PATH\\TO\\PROXIES";
            }
        }

        $this->contentBlock->addFile(__DIR__.'/../views/install.php', $this);
        $this->template->toHtml();
    }
Displays the first install 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)