You are here

public function Framework::formatProperty in Realistic Dummy Content 3.x

Same name and namespace in other branches
  1. 8.2 api/src/Framework/Framework.php \Drupal\realistic_dummy_content_api\Framework\Framework::formatProperty()
  2. 7.2 api/src/Framework/Framework.php \Drupal\realistic_dummy_content_api\Framework\Framework::formatProperty()

Formats a property to add it to an entity.

In Drupal8 it is just the file id, or value.

Parameters

string $type: Can be 'file', 'value', ...

mixed $value: A file, or string...

array $options: Extra options such as the format.

Return value

array The file data formatted for placement in an entity.

Overrides FrameworkInterface::formatProperty

1 method overrides Framework::formatProperty()
Drupal8::formatProperty in api/src/Framework/Drupal8.php
Formats a property to add it to an entity.

File

api/src/Framework/Framework.php, line 152

Class

Framework
The entry point for the framework.

Namespace

Drupal\realistic_dummy_content_api\Framework

Code

public function formatProperty($type, $value, array $options = []) : array {
  return $this
    ->implementor()
    ->formatProperty($type, $value, $options);
}