Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
acumatica
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
acumatica
Commits
8ba8d927
Commit
8ba8d927
authored
May 3, 2023
by
Dimitris Bozelos
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3357787
Added support for exporting to Acumatica fields
parent
d1048864
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Plugin/EntitySync/FieldTransformer/Field.php
+15
-3
15 additions, 3 deletions
src/Plugin/EntitySync/FieldTransformer/Field.php
with
15 additions
and
3 deletions
src/Plugin/EntitySync/FieldTransformer/Field.php
+
15
−
3
View file @
8ba8d927
...
@@ -9,8 +9,7 @@ use Drupal\Core\Entity\ContentEntityInterface;
...
@@ -9,8 +9,7 @@ use Drupal\Core\Entity\ContentEntityInterface;
* Transformer that imports/exports the value of an Acumatica field.
* Transformer that imports/exports the value of an Acumatica field.
*
*
* Extracts the main property value of a field attached to an Acumatica
* Extracts the main property value of a field attached to an Acumatica
* object. Currently only imports are supported, support for exports should be
* object.
* added here as well.
*
*
* Acumatica fields are similar to Drupal in that they contain their values in
* Acumatica fields are similar to Drupal in that they contain their values in
* properties. This plugin currently works with simple fields that have one main
* properties. This plugin currently works with simple fields that have one main
...
@@ -27,7 +26,7 @@ use Drupal\Core\Entity\ContentEntityInterface;
...
@@ -27,7 +26,7 @@ use Drupal\Core\Entity\ContentEntityInterface;
* parent object and we need to get the field object. The field
* parent object and we need to get the field object. The field
* object first. The
* object first. The
* - property_name: (string, optional, defaults to `value`) The name of the main
* - property_name: (string, optional, defaults to `value`) The name of the main
* property of the Acumatica field being imported.
* property of the Acumatica field being imported
/exported
.
*
*
* @EntitySyncFieldTransformer(
* @EntitySyncFieldTransformer(
* id = "acumatica_field"
* id = "acumatica_field"
...
@@ -44,6 +43,19 @@ class Field extends PluginBase {
...
@@ -44,6 +43,19 @@ class Field extends PluginBase {
]
+
parent
::
defaultConfiguration
();
]
+
parent
::
defaultConfiguration
();
}
}
/**
* {@inheritdoc}
*/
protected
function
transformExportedValue
(
$value
,
ContentEntityInterface
$local_entity
,
$remote_entity_id
,
array
$field_info
,
array
$context
)
{
return
[
$this
->
configuration
[
'property_name'
]
=>
$value
];
}
/**
/**
* {@inheritdoc}
* {@inheritdoc}
*
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment