$this->term->save();
// Create image.
- file_unmanaged_copy(\Drupal::root() . '/core/misc/druplicon.png', 'public://example.jpg');
+ file_unmanaged_copy($this->root . '/core/misc/druplicon.png', 'public://example.jpg');
$this->image = File::create(['uri' => 'public://example.jpg']);
$this->image->save();