InternalUri.php in Zircon Profile 8.0
File
core/modules/menu_link_content/src/Plugin/migrate/process/d6/InternalUri.php
View source
<?php
namespace Drupal\menu_link_content\Plugin\migrate\process\d6;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\Row;
class InternalUri extends ProcessPluginBase {
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
list($path) = $value;
if (parse_url($path, PHP_URL_SCHEME) === NULL) {
return 'internal:/' . $path;
}
return $path;
}
}