/** * Disables the component to the given domain. * * @param string $domainid Identifier name of the domain * @param array $params Parameters in the component definition * @access public * @return bool True when the component has been successfully disabled from the domain */ public function disable($domainid, $params) { $result = false; $override = self::OVERRIDE_NONE; if (isset($params['override'])) { switch ($params['override']) { case self::OVERRIDE_DOMAIN: case self::OVERRIDE_GLOBAL: $override = $params['override']; break; } } if ($this->getIsDomain() or isset($params['override']) and $params['override'] == self::OVERRIDE_DOMAIN) { if ($this->applicationsComponentsRegister->checkRegisterComponent($this->getType(), $this->name, $domainid, $this->appname, $override) != false) { if ($this->applicationsComponentsRegister->checkRegisterComponent($this->getType(), $this->name, $domainid, $this->appname, $override, true) == false) { if (strlen($domainid)) { // Start domain $this->container->startDomain(\Innomatic\Domain\Domain::getTenantNameById($domainid)); // Set the domain dataaccess for the component $this->domainda = $this->container->getCurrentDomain()->getDataAccess(); } $result = $this->doDisableDomainAction($domainid, $params); $this->applicationsComponentsRegister->unregisterComponent($this->appname, $this->getType(), $this->name, $domainid, $override); if (strlen($domainid)) { // Stop domain $this->container->stopDomain(); } } else { $result = $this->applicationsComponentsRegister->unregisterComponent($this->appname, $this->getType(), $this->name, $domainid, $override); } } } else { $result = true; } return $result; }