print ' appdisable tenantname application Disables a tenant' . "\n"; $script->cleanExit(); break; case 'enable': $tenant = new \Innomatic\Domain\Domain(InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess(), $argv[2], null); if ($tenant->enable()) { print "Tenant {$argv['2']} enabled\n"; $script->cleanExit(); } else { print "Tenant {$argv['2']} not enabled\n"; $script->cleanExit(1); } break; case 'disable': $tenant = new \Innomatic\Domain\Domain(InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess(), $argv[2], null); if ($tenant->disable()) { print "Tenant {$argv['2']} disabled\n"; $script->cleanExit(); } else { print "Tenant {$argv['2']} not disabled\n"; $script->cleanExit(1); } break; case 'create': $tenant = new \Innomatic\Domain\Domain(InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess(), 0, null); $data['domainid'] = $argv[2]; $data['domainname'] = $argv[3]; $data['domainpassword'] = $argv[4]; if ($tenant->create($data)) { print "Tenant {$argv['2']} created\n"; $script->cleanExit();
public function executeDisabledomain($eventData) { $null = null; $domain = new \Innomatic\Domain\Domain(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess(), $eventData['domainid'], $null); if ($domain->disable()) { $this->status = $this->localeCatalog->getStr('domaindisabled_status'); } else { $this->status = $this->localeCatalog->getStr('domainnotdisabled_status'); } $this->setChanged(); $this->notifyObservers('status'); }