You are here

public function Mapper::updateInfo in Feeds Paragraphs 8

Updates a property of TargetInfo object.

Parameters

FieldDefinitionInterface $field:

$property:

$value:

Return value

bool true on success.

2 calls to Mapper::updateInfo()
Mapper::getSubFields in src/Mapper.php
Mapper::getTargets in src/Mapper.php

File

src/Mapper.php, line 219

Class

Mapper

Namespace

Drupal\feeds_para_mapper

Code

public function updateInfo(FieldDefinitionInterface $field, $property, $value) {
  $info = $field
    ->get('target_info');
  if (!isset($info)) {
    $info = new TargetInfo();
  }
  $res = false;
  if (property_exists(TargetInfo::class, $property)) {
    $info->{$property} = $value;
    $field
      ->set('target_info', $info);
    $res = true;
  }
  return $res;
}