You are here

protected function CloudBlockBase::setConfig in Gutenberg 8.2

Same name and namespace in other branches
  1. 8 modules/gutenberg_cloud/src/CloudBlockBase.php \Drupal\gutenberg_cloud\CloudBlockBase::setConfig()

Sets object properties based on a given array.

Parameters

array $config: Associative array.

2 calls to CloudBlockBase::setConfig()
CloudBlock::mapFromBlock in modules/gutenberg_cloud/src/CloudBlock.php
Map the API block to CloudBlock properties.
CloudBlockBase::__construct in modules/gutenberg_cloud/src/CloudBlockBase.php
CloudBlockBase constructor.

File

modules/gutenberg_cloud/src/CloudBlockBase.php, line 170

Class

CloudBlockBase
Class CloudBlockBase.

Namespace

Drupal\gutenberg_cloud

Code

protected function setConfig(array $config) {
  foreach ($config as $property => $value) {
    if (property_exists($this, $property)) {
      $this->{$property} = $value;
    }
  }
}