GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — 7.x-1.x ( 34e25a...94dab8 )
by Devin
03:48
created

DFHeroBeans::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 47
Code Lines 32

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 1
Metric Value
cc 2
eloc 32
c 3
b 0
f 1
nc 2
nop 1
dl 0
loc 47
rs 9.0303
1
<?php
2
3
/**
4
 * @file
5
 *  Migrations for Block Entities.
6
 */
7
8
class DFHeroBeans extends Migration {
9
10
  public function __construct($arguments) {
11
    parent::__construct($arguments);
12
    $this->description = t('Import Hero Blocks.');
13
14
    // Create a map object for tracking the relationships between source rows
15
    $this->map = new MigrateSQLMap($this->machineName,
16
      array(
17
        'UUID' => array(
18
          'type' => 'varchar',
19
          'length' => 36,
20
          'not null' => FALSE,
21
          'description' => 'The Universally Unique Identifier.',
22
        )
23
      ),
24
      array(
25
        'uuid' => array(
26
          'type' => 'varchar',
27
          'length' => 36,
28
          'not null' => FALSE,
29
          'description' => 'The Universally Unique Identifier.',
30
        )
31
      )
32
    );
33
34
    // Create a MigrateSource object.
35
    if (isset($arguments['path'])) {
36
      $import_path = $arguments['path'];
37
    }
38
    else {
39
      $import_path = drupal_get_path('module', 'df_tools_hero') . '/import/df_tools_hero.fpp.hero.csv';
40
    }
41
    $this->source = new MigrateSourceCSV($import_path, array(), array('header_rows' => 1));
42
    $this->destination = new MigrateDestinationBean('df_bean_hero');
43
44
    $this->addFieldMapping('field_hero_image', 'Image');
45
    $this->addFieldMapping('field_hero_image:file_replace')->defaultValue(FILE_EXISTS_REPLACE);
46
    $this->addFieldMapping('field_hero_image:source_dir')->defaultValue(dirname($import_path) . '/images');
47
    $this->addFieldMapping('field_hero_image:destination_file', 'filename');
48
49
    $this->addFieldMapping('field_hero_headline_1', 'Headline 1');
50
    $this->addFieldMapping('field_hero_headline_2', 'Headline 2');
51
    $this->addFieldMapping('field_hero_button', 'Button Link');
52
    $this->addFieldMapping('field_hero_button:title', 'Button Title');
53
54
    $this->addFieldMapping('label', 'Title');
55
    $this->addFieldMapping('uuid', 'UUID');
56
  }
57
58
}
59