UrlAliasLanguage.php
Same filename in other branches
Namespace
Drupal\path\Plugin\migrate\process\d6File
-
core/
modules/ path/ src/ Plugin/ migrate/ process/ d6/ UrlAliasLanguage.php
View source
<?php
namespace Drupal\path\Plugin\migrate\process\d6;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\Row;
use Drupal\Core\Language\LanguageInterface;
/**
* Url alias language code process.
*
* @MigrateProcessPlugin(
* id = "d6_url_alias_language"
* )
*/
class UrlAliasLanguage extends ProcessPluginBase {
/**
* {@inheritdoc}
*/
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
$langcode = $value === '' ? LanguageInterface::LANGCODE_NOT_SPECIFIED : $value;
return $langcode;
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
UrlAliasLanguage | Url alias language code process. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.