Same filename in this branch
- 10 core/modules/taxonomy/src/Plugin/migrate/process/ForumVocabulary.php
- 10 core/modules/forum/src/Plugin/migrate/process/ForumVocabulary.php
Same filename and directory in other branches
- 8.9.x core/modules/taxonomy/src/Plugin/migrate/process/ForumVocabulary.php
- 9 core/modules/taxonomy/src/Plugin/migrate/process/ForumVocabulary.php
Namespace
Drupal\taxonomy\Plugin\migrate\process
File
core/modules/taxonomy/src/Plugin/migrate/process/ForumVocabulary.php
View source
<?php
namespace Drupal\taxonomy\Plugin\migrate\process;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\Row;
class ForumVocabulary extends ProcessPluginBase {
public function __construct(array $configuration, $plugin_id, $plugin_definition) {
@trigger_error(__CLASS__ . 'is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \\Drupal\\forum\\Plugin\\migrate\\process\\ForumVocabulary instead. See https://www.drupal.org/node/3387830', E_USER_DEPRECATED);
parent::__construct($configuration, $plugin_id, $plugin_definition);
}
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
if ($row
->getSourceProperty('forum_vocabulary') && !empty($this->configuration['machine_name'])) {
$value = $this->configuration['machine_name'];
}
return $value;
}
}
Classes
Name |
Description |
ForumVocabulary Deprecated |
Checks if the vocabulary being migrated is the one used for forums. |