You are here

protected function EntityShareSerializedDataEnhancer::doTransform in Entity Share 8.3

File

src/Plugin/jsonapi/FieldEnhancer/EntityShareSerializedDataEnhancer.php, line 24

Class

EntityShareSerializedDataEnhancer
Prepare paragraph serialized data value.

Namespace

Drupal\entity_share\Plugin\jsonapi\FieldEnhancer

Code

protected function doTransform($data, Context $context) {
  return is_array($data) ? [
    'value' => $data,
  ] : $data;
}