Drupal 8  8.0.2
MachineName Class Reference
Inheritance diagram for MachineName:

Public Member Functions

 __construct (array $configuration, $plugin_id, $plugin_definition, TransliterationInterface $transliteration)
 transform ($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property)
- Public Member Functions inherited from ProcessPluginBase
 transform ($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property)
 multiple ()
- Public Member Functions inherited from PluginInspectionInterface
 getPluginId ()
 getPluginDefinition ()

Static Public Member Functions

static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)

Protected Attributes


Detailed Description

This plugin creates a machine name.

The current value gets transliterated, non-alphanumeric characters removed and replaced by an underscore and multiple underscores are collapsed into one.

( id = "machine_name" )

Constructor & Destructor Documentation

__construct ( array  $configuration,
TransliterationInterface  $transliteration 

Constructs a MachineName plugin.

array$configurationThe plugin configuration.
string$plugin_idThe plugin ID.
mixed$plugin_definitionThe plugin definition.
\Drupal\Component\Transliteration\TransliterationInterface$transliterationThe transliteration service.

References Drupal\transliteration().

Here is the call graph for this function:

Member Function Documentation

static create ( ContainerInterface  $container,
array  $configuration,

{Creates an instance of the plugin.

\Symfony\Component\DependencyInjection\ContainerInterface$containerThe container to pull out services used in the plugin.
array$configurationA configuration array containing information about the plugin instance.
string$plugin_idThe plugin ID for the plugin instance.
mixed$plugin_definitionThe plugin implementation definition.
static Returns an instance of this plugin.

Implements ContainerFactoryPluginInterface.

transform (   $value,
MigrateExecutableInterface  $migrate_executable,
Row  $row,

{Performs the associated process.

mixed$valueThe value to be transformed.
\Drupal\migrate\MigrateExecutableInterface$migrate_executableThe migration in which this process is being executed.
\Drupal\migrate\Row$rowThe row from the source to process. Normally, just transforming the value is adequate but very rarely you might need to change two columns at the same time or something like that.
string$destination_propertyThe destination property currently worked on. This is only used together with the $row above.
string|array The newly transformed value.

Implements MigrateProcessInterface.

References LanguageInterface\LANGCODE_DEFAULT, and Drupal\transliteration().

Here is the call graph for this function:

The documentation for this class was generated from the following file: