Elcodi\Admin\TemplateBundle\Controller\TemplateController::assignAction PHP Метод

assignAction() публичный Метод

Assign a template selection to the store
public assignAction ( Elcodi\Component\Store\Entity\Interfaces\StoreInterface $store, $hash ) : Response
$store Elcodi\Component\Store\Entity\Interfaces\StoreInterface Store
Результат Symfony\Component\HttpFoundation\Response Response
    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'];
    }
TemplateController