Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php namespace Drupal\field\Plugin\migrate\process\d7; use Drupal\migrate\MigrateExecut..

Decoded Output download

<?php

namespace Drupalield\Plugin\migrate\process\d7;

use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\Row;

/**
 * @MigrateProcessPlugin(
 *   id = "d7_field_instance_defaults"
 * )
 */
class FieldInstanceDefaults extends ProcessPluginBase {

  /**
   * {@inheritdoc}
   */
  public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
    list($default_value, $widget_settings) = $value;
    $widget_type = $widget_settings['type'];

    $default = [];

    foreach ($default_value as $item) {
      switch ($widget_type) {
        // Add special processing here if needed.
        default:
          $default[] = $item;
      }
    }

    return $default;
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Drupal\field\Plugin\migrate\process\d7;

use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\Row;

/**
 * @MigrateProcessPlugin(
 *   id = "d7_field_instance_defaults"
 * )
 */
class FieldInstanceDefaults extends ProcessPluginBase {

  /**
   * {@inheritdoc}
   */
  public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
    list($default_value, $widget_settings) = $value;
    $widget_type = $widget_settings['type'];

    $default = [];

    foreach ($default_value as $item) {
      switch ($widget_type) {
        // Add special processing here if needed.
        default:
          $default[] = $item;
      }
    }

    return $default;
  }

}

Function Calls

None

Variables

None

Stats

MD5 52fc1e9c69d29c94562577ecc231b58e
Eval Count 0
Decode Time 73 ms