public function requirementsAction() { $data = $this->getCachedVersion(); if (!isset($data->checks)) { $this->View()->assign(array('success' => true)); return; } $user = Shopware()->Auth()->getIdentity(); $userLang = $this->getUserLanguage($user); $namespace = $this->get('snippets')->getNamespace('backend/swag_update/main'); $validation = new Validation($namespace, $userLang); $this->View()->assign(array('success' => true, 'data' => $validation->checkRequirements($data->checks))); }
public function requirementsAction() { $data = $this->getCachedVersion(); if (!isset($data->checks)) { $this->View()->assign(array('success' => true)); return; } $user = Shopware()->Auth()->getIdentity(); $userLang = $this->getUserLanguage($user); $namespace = $this->get('snippets')->getNamespace('backend/swag_update/main'); $fileSystem = new \ShopwarePlugins\SwagUpdate\Components\FileSystem(); $conn = $this->get('dbal_connection'); $checks = array(new RegexCheck($namespace, $userLang), new MySQLVersionCheck($conn, $namespace), new PHPVersionCheck($namespace), new EmotionTemplateCheck($conn, $namespace), new PHPExtensionCheck($namespace), new WritableCheck($fileSystem, $namespace), new IonCubeLoaderCheck($namespace), new LicenseCheck($conn, $this->container->getParameter('shopware.store.apiEndpoint'), $this->getShopwareVersion(), $namespace)); $validation = new Validation($namespace, $checks); $this->View()->assign(array('success' => true, 'data' => $validation->checkRequirements($data->checks))); }