public function assignAction(StoreInterface $store, $hash) { /** * @var Plugin $plugin */ $plugin = $this->get('elcodi.repository.plugin')->findOneBy(['hash' => $hash, 'type' => PluginTypes::TYPE_TEMPLATE]); $store->setTemplate($plugin->getHash()); $this->get('elcodi.object_manager.store')->flush($store); return ['status' => 200, 'message' => 'ok']; }