Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / path / src / Plugin / migrate / process / d6 / UrlAliasLanguage.php
1 <?php
2
3 namespace Drupal\path\Plugin\migrate\process\d6;
4
5 use Drupal\migrate\MigrateExecutableInterface;
6 use Drupal\migrate\ProcessPluginBase;
7 use Drupal\migrate\Row;
8 use Drupal\Core\Language\LanguageInterface;
9
10 /**
11  * Url alias language code process.
12  *
13  * @MigrateProcessPlugin(
14  *   id = "d6_url_alias_language"
15  * )
16  */
17 class UrlAliasLanguage extends ProcessPluginBase {
18
19   /**
20    * {@inheritdoc}
21    */
22   public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
23     $langcode = ($value === '') ? LanguageInterface::LANGCODE_NOT_SPECIFIED : $value;
24     return $langcode;
25   }
26
27 }