ea336829bfb02d5c69c5422949eb9a7f551e7201
[yaffs-website] / web / core / modules / block_content / src / Plugin / migrate / source / d7 / BlockCustom.php
1 <?php
2
3 namespace Drupal\block_content\Plugin\migrate\source\d7;
4
5 use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
6
7 /**
8  * Drupal 7 custom block source from database.
9  *
10  * @MigrateSource(
11  *   id = "d7_block_custom"
12  * )
13  */
14 class BlockCustom extends DrupalSqlBase {
15
16   /**
17    * {@inheritdoc}
18    */
19   public function query() {
20     return $this->select('block_custom', 'b')->fields('b');
21   }
22
23   /**
24    * {@inheritdoc}
25    */
26   public function fields() {
27     return [
28       'bid' => $this->t('The numeric identifier of the block/box'),
29       'body' => $this->t('The block/box content'),
30       'info' => $this->t('Admin title of the block/box.'),
31       'format' => $this->t('Input format of the custom block/box content.'),
32     ];
33   }
34
35   /**
36    * {@inheritdoc}
37    */
38   public function getIds() {
39     $ids['bid']['type'] = 'integer';
40     return $ids;
41   }
42
43 }