removeFromDatabase example


        $pluginBootstrap = $this->getPluginByName($plugin->getName());

        return $pluginBootstrap->getPath();
    }

    /** * @param bool $removeDirty */
    private function removeSnippets(PluginBootstrap $bootstrap$removeDirty)
    {
        $this->snippetHandler->removeFromDatabase($bootstrap->getPath() . '/Resources/snippets/', $removeDirty);
    }

    /** * @throws Exception */
    private function installResources(PluginBootstrap $bootstrap, Plugin $plugin)
    {
        if (is_file($bootstrap->getPath() . '/Resources/config.xml')) {
            $this->installForm($plugin$bootstrap->getPath() . '/Resources/config.xml');
        }

        


    /** * Removes the snippets present in the plugin's ini files * from the database * * @param bool $removeDirty if true, the snippets changed by the * shop owner will also be removed */
    public function removeSnippets($removeDirty = false)
    {
        $this->get(DatabaseHandler::class)->removeFromDatabase($this->Path() . 'Snippets/', $removeDirty);
        $this->get(DatabaseHandler::class)->removeFromDatabase($this->Path() . 'snippets/', $removeDirty);
        $this->get(DatabaseHandler::class)->removeFromDatabase($this->Path() . 'Resources/snippet/', $removeDirty);
    }

    /** * Adds translations to the form and its elements. The accepted array format * accepts a special 'plugin_form' key for the form translation. All other * keys will be matched to element names. * * Example $translations array: * <code> * array( * 'en_GB' => array( * 'plugin_form' => array( * 'label' => 'Recently viewed items' * ), * 'show' => array( * 'label' => 'Display recently viewed items' * ), * 'thumb' => array( * 'label' => 'Thumbnail size', * 'description' => 'Index of the thumbnail size of the associated album to use. Starts at 0' * ) * ) * ) * </code> * * @param array $translations */


        $folder = $input->getArgument('folder');
        if (!\is_string($folder)) {
            throw new RuntimeException('Argument "folder" needs to be a string');
        }

        $folder = $rootDir . '/' . $folder . '/';

        $databaseLoader = $this->container->get(DatabaseHandler::class);
        $databaseLoader->setOutput($output);
        $databaseLoader->removeFromDatabase($folder);

        return 0;
    }
}
Home | Imprint | This part of the site doesn't use cookies.