/** * Reads all relations of the provided route and writes them to the tables * * @param integer $routeId */ public function updateRelations($routeId) { // remove all existing entries $this->removeExistingRelations($routeId); // get dependencies of the config $methods = $this->routesMethodTable->getMethods($routeId); $schemas = $this->getDependingSchemas($methods); $actions = $this->getDependingActions($methods); foreach ($schemas as $schemaId) { $this->routesSchemaTable->create(array('routeId' => $routeId, 'schemaId' => $schemaId)); } foreach ($actions as $actionId) { $this->routesActionTable->create(array('routeId' => $routeId, 'actionId' => $actionId)); } }