Ingredient.php in Recipe 8.2
File
modules/ingredient/src/Plugin/migrate/source/recipe1x/Ingredient.php
View source
<?php
namespace Drupal\ingredient\Plugin\migrate\source\recipe1x;
use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
class Ingredient extends DrupalSqlBase {
public function query() {
return $this
->select('recipe_ingredient', 'i')
->fields('i', [
'id',
'name',
])
->orderBy('i.id');
}
public function fields() {
return [
'id' => $this
->t('Ingredient ID'),
'name' => $this
->t('Ingredient name'),
];
}
public function getIds() {
return [
'id' => [
'type' => 'integer',
],
];
}
}
Classes
Name |
Description |
Ingredient |
Drupal 6.x-1.x and 7.x-1.x ingredient source from database. |