public function addApplicationToSystemConfiguration(ApplicationInterface $application) { // try to load the API app service instance $appNode = $this->getService()->loadByWebappPath($application->getWebappPath()); // check if the application has already been attached to the container if ($appNode == null) { $this->getService()->newFromApplication($application); } // connect the application to the container $application->connect(); }