class Vocabulary
Same name in this branch
- 10 core/modules/taxonomy/src/Entity/Vocabulary.php \Drupal\taxonomy\Entity\Vocabulary
- 10 core/modules/taxonomy/src/Plugin/migrate/source/d6/Vocabulary.php \Drupal\taxonomy\Plugin\migrate\source\d6\Vocabulary
Same name and namespace in other branches
- 9 core/modules/taxonomy/src/Entity/Vocabulary.php \Drupal\taxonomy\Entity\Vocabulary
- 9 core/modules/taxonomy/src/Plugin/migrate/source/d6/Vocabulary.php \Drupal\taxonomy\Plugin\migrate\source\d6\Vocabulary
- 9 core/modules/taxonomy/src/Plugin/migrate/source/d7/Vocabulary.php \Drupal\taxonomy\Plugin\migrate\source\d7\Vocabulary
- 8.9.x core/modules/taxonomy/src/Entity/Vocabulary.php \Drupal\taxonomy\Entity\Vocabulary
- 8.9.x core/modules/taxonomy/src/Plugin/migrate/source/d6/Vocabulary.php \Drupal\taxonomy\Plugin\migrate\source\d6\Vocabulary
- 8.9.x core/modules/taxonomy/src/Plugin/migrate/source/d7/Vocabulary.php \Drupal\taxonomy\Plugin\migrate\source\d7\Vocabulary
- 11.x core/modules/taxonomy/src/Entity/Vocabulary.php \Drupal\taxonomy\Entity\Vocabulary
- 11.x core/modules/taxonomy/src/Plugin/migrate/source/d6/Vocabulary.php \Drupal\taxonomy\Plugin\migrate\source\d6\Vocabulary
- 11.x core/modules/taxonomy/src/Plugin/migrate/source/d7/Vocabulary.php \Drupal\taxonomy\Plugin\migrate\source\d7\Vocabulary
Drupal 7 vocabularies source from database.
For available configuration keys, refer to the parent classes.
Plugin annotation
@MigrateSource(
id = "d7_taxonomy_vocabulary",
source_module = "taxonomy"
)
Hierarchy
- class \Drupal\taxonomy\Plugin\migrate\source\d7\Vocabulary
Expanded class hierarchy of Vocabulary
See also
\Drupal\migrate\Plugin\migrate\source\SqlBase
\Drupal\migrate\Plugin\migrate\source\SourcePluginBase
11 string references to 'Vocabulary'
- OverviewTerms::buildForm in core/
modules/ taxonomy/ src/ Form/ OverviewTerms.php - Form constructor.
- OverviewTerms::submitForm in core/
modules/ taxonomy/ src/ Form/ OverviewTerms.php - Form submission handler.
- OverviewTerms::submitReset in core/
modules/ taxonomy/ src/ Form/ OverviewTerms.php - Redirects to confirmation form for the reset action.
- taxonomy.schema.yml in core/
modules/ taxonomy/ config/ schema/ taxonomy.schema.yml - core/modules/taxonomy/config/schema/taxonomy.schema.yml
- taxonomy.views.schema.yml in core/
modules/ taxonomy/ config/ schema/ taxonomy.views.schema.yml - core/modules/taxonomy/config/schema/taxonomy.views.schema.yml
File
-
core/
modules/ taxonomy/ src/ Plugin/ migrate/ source/ d7/ Vocabulary.php, line 21
Namespace
Drupal\taxonomy\Plugin\migrate\source\d7View source
class Vocabulary extends DrupalSqlBase {
/**
* {@inheritdoc}
*/
public function query() {
$query = $this->select('taxonomy_vocabulary', 'v')
->fields('v', [
'vid',
'name',
'description',
'hierarchy',
'module',
'weight',
'machine_name',
]);
return $query;
}
/**
* {@inheritdoc}
*/
public function fields() {
return [
'vid' => $this->t('The vocabulary ID.'),
'name' => $this->t('The name of the vocabulary.'),
'description' => $this->t('The description of the vocabulary.'),
'hierarchy' => $this->t('The type of hierarchy allowed within the vocabulary. (0 = disabled, 1 = single, 2 = multiple)'),
'module' => $this->t('Module responsible for the vocabulary.'),
'weight' => $this->t('The weight of the vocabulary in relation to other vocabularies.'),
'machine_name' => $this->t('Unique machine name of the vocabulary.'),
];
}
/**
* {@inheritdoc}
*/
public function prepareRow(Row $row) {
// If the vocabulary being migrated is the one defined in the
// 'forum_nav_vocabulary' variable, set the 'forum_vocabulary' source
// property to true so we know this is the vocabulary used by Forum.
if ($this->variableGet('forum_nav_vocabulary', 0) == $row->getSourceProperty('vid')) {
$row->setSourceProperty('forum_vocabulary', TRUE);
}
return parent::prepareRow($row);
}
/**
* {@inheritdoc}
*/
public function getIds() {
$ids['vid']['type'] = 'integer';
return $ids;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
DependencySerializationTrait::$_entityStorages | protected | property | An array of entity type IDs keyed by the property name of their storages. | ||
DependencySerializationTrait::$_serviceIds | protected | property | An array of service IDs keyed by property name used for serialization. | ||
DependencySerializationTrait::__wakeup | public | function | #[\ReturnTypeWillChange] | 2 | |
DependencyTrait::$dependencies | protected | property | The object's dependencies. | ||
DependencyTrait::addDependencies | protected | function | Adds multiple dependencies. | ||
DependencyTrait::addDependency | protected | function | Adds a dependency. | ||
MessengerTrait::$messenger | protected | property | The messenger. | 25 | |
MessengerTrait::messenger | public | function | Gets the messenger. | 25 | |
MessengerTrait::setMessenger | public | function | Sets the messenger. | ||
PluginBase::$configuration | protected | property | Configuration information passed into the plugin. | 1 | |
PluginBase::$pluginDefinition | protected | property | The plugin implementation definition. | 1 | |
PluginBase::$pluginId | protected | property | The plugin ID. | ||
PluginBase::DERIVATIVE_SEPARATOR | constant | A string which is used to separate base plugin IDs from the derivative ID. | |||
PluginBase::getBaseId | public | function | Gets the base_plugin_id of the plugin instance. | Overrides DerivativeInspectionInterface::getBaseId | |
PluginBase::getDerivativeId | public | function | Gets the derivative_id of the plugin instance. | Overrides DerivativeInspectionInterface::getDerivativeId | |
PluginBase::getPluginDefinition | public | function | Gets the definition of the plugin implementation. | Overrides PluginInspectionInterface::getPluginDefinition | 2 |
PluginBase::getPluginId | public | function | Gets the plugin ID of the plugin instance. | Overrides PluginInspectionInterface::getPluginId | |
PluginBase::isConfigurable | public | function | Determines if the plugin is configurable. | ||
StringTranslationTrait::$stringTranslation | protected | property | The string translation service. | 3 | |
StringTranslationTrait::formatPlural | protected | function | Formats a string containing a count of items. | ||
StringTranslationTrait::getNumberOfPlurals | protected | function | Returns the number of plurals supported by a given language. | ||
StringTranslationTrait::getStringTranslation | protected | function | Gets the string translation service. | ||
StringTranslationTrait::setStringTranslation | public | function | Sets the string translation service to use. | 2 | |
StringTranslationTrait::t | protected | function | Translates a string to the current language or to a given language. | ||
Vocabulary::fields | public | function | Returns available fields on the source. | 2 | |
Vocabulary::getIds | public | function | Defines the source fields uniquely identifying a source row. | 1 | |
Vocabulary::prepareRow | public | function | Adds additional data to the row. | ||
Vocabulary::query | public | function | 2 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.