|
@@ -20,6 +20,9 @@ class FieldProcess extends ProcessPluginBase {
|
|
|
|
|
|
protected $isMultiple;
|
|
|
|
|
|
+
|
|
|
+ * {@inheritdoc}
|
|
|
+ */
|
|
|
public function __construct(
|
|
|
array $configuration,
|
|
|
$plugin_id,
|
|
@@ -27,7 +30,8 @@ class FieldProcess extends ProcessPluginBase {
|
|
|
) {
|
|
|
parent::__construct($configuration, $plugin_id, $plugin_definition);
|
|
|
if (isset($this->configuration['field'])) {
|
|
|
- $this->fieldValues = array_flip(FieldStorageConfig::load($this->configuration['field'])->getSetting('allowed_values'));
|
|
|
+ $this->fieldValues = array_flip(FieldStorageConfig::load($this->configuration['field'])
|
|
|
+ ->getSetting('allowed_values'));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -36,11 +40,7 @@ class FieldProcess extends ProcessPluginBase {
|
|
|
*
|
|
|
* Optional: add prefix and suffix within the comment.
|
|
|
*
|
|
|
- * @param mixed $value
|
|
|
- * @param \Drupal\migrate\MigrateExecutableInterface $migrate_executable
|
|
|
- * @param \Drupal\migrate\Row $row
|
|
|
- * @param mixed $destination_property
|
|
|
- * @return null|string
|
|
|
+ * {@inheritdoc}
|
|
|
*/
|
|
|
public function transformComment(
|
|
|
$value,
|
|
@@ -61,12 +61,7 @@ class FieldProcess extends ProcessPluginBase {
|
|
|
|
|
|
* Remove everything except the target it to avoid extra ID issues.
|
|
|
*
|
|
|
- * @param mixed $value
|
|
|
- * @param \Drupal\migrate\MigrateExecutableInterface $migrate_executable
|
|
|
- * @param \Drupal\migrate\Row $row
|
|
|
- * @param mixed $destination_property
|
|
|
- * @return null|string
|
|
|
- *
|
|
|
+ * {@inheritdoc}
|
|
|
*/
|
|
|
public function transformEntityReference(
|
|
|
$value,
|
|
@@ -109,13 +104,9 @@ class FieldProcess extends ProcessPluginBase {
|
|
|
}
|
|
|
|
|
|
|
|
|
- * Remove empty items from a list, just like array_filter
|
|
|
+ * Remove empty items from a list, just like array_filter().
|
|
|
*
|
|
|
- * @param mixed $value
|
|
|
- * @param \Drupal\migrate\MigrateExecutableInterface $migrate_executable
|
|
|
- * @param \Drupal\migrate\Row $row
|
|
|
- * @param mixed $destination_property
|
|
|
- * @return null|string
|
|
|
+ * {@inheritdoc}
|
|
|
*/
|
|
|
public function transformFilter(
|
|
|
$value,
|
|
@@ -130,11 +121,7 @@ class FieldProcess extends ProcessPluginBase {
|
|
|
|
|
|
* Trim an array to its first element.
|
|
|
*
|
|
|
- * @param mixed $value
|
|
|
- * @param \Drupal\migrate\MigrateExecutableInterface $migrate_executable
|
|
|
- * @param \Drupal\migrate\Row $row
|
|
|
- * @param mixed $destination_property
|
|
|
- * @return null|string
|
|
|
+ * {@inheritdoc}
|
|
|
*/
|
|
|
public function transformFirst(
|
|
|
$value,
|
|
@@ -153,11 +140,7 @@ class FieldProcess extends ProcessPluginBase {
|
|
|
|
|
|
* Extract a sub-key from a D6-style image field. Useless on > D7 sources.
|
|
|
*
|
|
|
- * @param mixed $value
|
|
|
- * @param \Drupal\migrate\MigrateExecutableInterface $migrate_executable
|
|
|
- * @param \Drupal\migrate\Row $row
|
|
|
- * @param mixed $destination_property
|
|
|
- * @return null|string
|
|
|
+ * {@inheritdoc}
|
|
|
*/
|
|
|
public function transformImageData(
|
|
|
$value,
|
|
@@ -175,8 +158,12 @@ class FieldProcess extends ProcessPluginBase {
|
|
|
* Helper: build a search URL for a value.
|
|
|
*
|
|
|
* @param string $bundle
|
|
|
+ * The node bundle.
|
|
|
* @param string $query
|
|
|
+ * The query to generate.
|
|
|
+ *
|
|
|
* @return \Drupal\Core\Url
|
|
|
+ * The generated search URL.
|
|
|
*
|
|
|
* @see \Drupal\reinstall\Plugin\migrate\process\FieldProcess::transformLink()
|
|
|
*/
|
|
@@ -194,11 +181,7 @@ class FieldProcess extends ProcessPluginBase {
|
|
|
|
|
|
* Transform a link field. Beware limitations.
|
|
|
*
|
|
|
- * @param mixed $value
|
|
|
- * @param \Drupal\migrate\MigrateExecutableInterface $migrate_executable
|
|
|
- * @param \Drupal\migrate\Row $row
|
|
|
- * @param mixed $destination_property
|
|
|
- * @return null|string
|
|
|
+ * {@inheritdoc}
|
|
|
*/
|
|
|
public function transformLink(
|
|
|
$value,
|
|
@@ -251,11 +234,7 @@ class FieldProcess extends ProcessPluginBase {
|
|
|
|
|
|
* Like static_map, but based on the destination and not doing queries.
|
|
|
*
|
|
|
- * @param mixed $value
|
|
|
- * @param \Drupal\migrate\MigrateExecutableInterface $migrate_executable
|
|
|
- * @param \Drupal\migrate\Row $row
|
|
|
- * @param mixed $destination_property
|
|
|
- * @return null|string
|
|
|
+ * {@inheritdoc}
|
|
|
*/
|
|
|
public function transformLookupList(
|
|
|
$value,
|
|
@@ -270,11 +249,7 @@ class FieldProcess extends ProcessPluginBase {
|
|
|
|
|
|
* For multiple use only: push a configured value to the value array.
|
|
|
*
|
|
|
- * @param mixed $value
|
|
|
- * @param \Drupal\migrate\MigrateExecutableInterface $migrate_executable
|
|
|
- * @param \Drupal\migrate\Row $row
|
|
|
- * @param mixed $destination_property
|
|
|
- * @return null|string
|
|
|
+ * {@inheritdoc}
|
|
|
*/
|
|
|
public function transformPush(
|
|
|
$value,
|