You are here

public function CliCommandWrapper::overwritePluginFiles in CKEditor Media Embed Plugin 8

Overwrite the plugin files.

Parameters

$command: A command object (e.g., a Drush or Drupal Console command).

$overwrite: User's response regarding overwriting plugin files.

File

src/Command/CliCommandWrapper.php, line 127

Class

CliCommandWrapper
Class CLICommands.

Namespace

Drupal\ckeditor_media_embed\Command

Code

public function overwritePluginFiles(CKEditorCliCommandInterface $command, $overwrite) {
  $package_directory = $this
    ->downloadCKEditorFull($command);
  foreach (AssetManager::getPlugins($this->packageVersion) as $plugin) {
    $this
      ->installCKEditorPlugin($command, $package_directory, $plugin, $overwrite);
  }
  $this->configFactory
    ->getEditable('ckeditor_media_embed.settings')
    ->set('plugins_version_installed', $this->packageVersion)
    ->save();
  $this->ckeditorPluginManager
    ->clearCachedDefinitions();
}