Skip to content

Instantly share code, notes, and snippets.

View politsin's full-sized avatar
💭
I may be slow to respond.

Anatoly politsin

💭
I may be slow to respond.
View GitHub Profile
🟢🟣
<?php
echo "hh\n";
<?php
namespace Drupal\migration\Utility;
/**
* FeedsToMigration.
*/
class InsertMigration {
/**
<?php
$path = $product->field_path->value;
if ($path && $product->id()) {
$path = "/{$path}";
$aliasManager = \Drupal::service('path.alias_manager');
$languageManager = \Drupal::languageManager();
$langcode = $languageManager->getDefaultLanguage()->getId();
$system_path = '/product/' . $product->id();
$currentPath = $aliasManager->getAliasByPath($system_path);
$aliasStorage = \Drupal::service('path.alias_storage');