You are here

protected function DemoImage::getOptionalProperty in Panopoly 8.2

Gets the value of an optional property.

Parameters

string $config_name: The configuration key that holds the name of the source property.

\Drupal\migrate\Row $row: The row.

Return value

mixed|null Returns the value of the property or NULL if not found.

1 call to DemoImage::getOptionalProperty()
DemoImage::transform in modules/panopoly/panopoly_core/src/Plugin/migrate/process/DemoImage.php
Performs the associated process.

File

modules/panopoly/panopoly_core/src/Plugin/migrate/process/DemoImage.php, line 245

Class

DemoImage
Process plugin for creating demo images from files in the module.

Namespace

Drupal\panopoly_core\Plugin\migrate\process

Code

protected function getOptionalProperty($config_name, Row $row) {
  if (!empty($this->configuration[$config_name])) {
    return $row
      ->getSourceProperty($this->configuration[$config_name]);
  }
}