function Menu::fields
Same name in other branches
- 9 core/modules/system/src/Plugin/migrate/source/Menu.php \Drupal\system\Plugin\migrate\source\Menu::fields()
- 8.9.x core/modules/system/src/Plugin/migrate/source/Menu.php \Drupal\system\Plugin\migrate\source\Menu::fields()
- 10 core/modules/system/src/Plugin/migrate/source/Menu.php \Drupal\system\Plugin\migrate\source\Menu::fields()
Overrides MigrateSourceInterface::fields
2 calls to Menu::fields()
- MenuTest::fields in core/
modules/ migrate_drupal_ui/ tests/ modules/ migrate_drupal_message_test/ src/ Plugin/ migrate/ source/ MenuTest.php - Returns available fields on the source.
- MenuTranslation::fields in core/
modules/ system/ src/ Plugin/ migrate/ source/ d7/ MenuTranslation.php - Returns available fields on the source.
2 methods override Menu::fields()
- MenuTest::fields in core/
modules/ migrate_drupal_ui/ tests/ modules/ migrate_drupal_message_test/ src/ Plugin/ migrate/ source/ MenuTest.php - Returns available fields on the source.
- MenuTranslation::fields in core/
modules/ system/ src/ Plugin/ migrate/ source/ d7/ MenuTranslation.php - Returns available fields on the source.
File
-
core/
modules/ system/ src/ Plugin/ migrate/ source/ Menu.php, line 32
Class
- Menu
- Drupal 6/7 menu source from database.
Namespace
Drupal\system\Plugin\migrate\sourceCode
public function fields() {
$fields = [
'menu_name' => $this->t('The menu name. Primary key.'),
'title' => $this->t('The human-readable name of the menu.'),
'description' => $this->t('A description of the menu'),
];
// The database connection may not exist, for example, when building
// the Migrate Message form.
if ($source_database = $this->database) {
if ($source_database->schema()
->fieldExists('menu_custom', 'language')) {
$fields += [
'language' => $this->t('Menu language.'),
'i8n_mode' => $this->t('Menu i18n mode.'),
];
}
}
return $fields;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.