config = $config; } /** * @return array */ protected function returnSuccess() { return array( 'status' => 'success' ); } /** * Add a new trusted domain * @param string $newTrustedDomain The newly to add trusted domain * @return array */ public function trustedDomains($newTrustedDomain) { $trustedDomains = $this->config->getSystemValue('trusted_domains'); $trustedDomains[] = $newTrustedDomain; $this->config->setSystemValue('trusted_domains', $trustedDomains); return $this->returnSuccess(); } }