You are here

public function NagiosDynamicSettings::prepareRow in Nagios Monitoring 8

Adds additional data to the row.

Parameters

\Drupal\migrate\Row $row: The row object.

Return value

bool FALSE if this row needs to be skipped.

Overrides SourcePluginBase::prepareRow

File

src/Plugin/migrate/source/NagiosDynamicSettings.php, line 57

Class

NagiosDynamicSettings
Fetches Drupal 7 variables on which module hooks are active from the source database.

Namespace

Drupal\nagios\Plugin\migrate\source

Code

public function prepareRow(Row $row) {
  $var_name = $row
    ->getSourceProperty('name');
  $module_name = str_replace('nagios_enable_', '', $var_name);
  $value = unserialize($row
    ->getSourceProperty('value'), [
    'allowed_classes' => FALSE,
  ]);
  $row
    ->setDestinationProperty('nagios/enable/' . $module_name, $value);
}