You are here

public function TestComplexData::setContext in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/serialization/tests/src/Unit/Normalizer/ComplexDataNormalizerTest.php \Drupal\Tests\serialization\Unit\Normalizer\TestComplexData::setContext()

Sets the context of a property or item via a context aware parent.

This method is supposed to be called by the factory only.

Parameters

string|null $name: (optional) The name of the property or the delta of the list item, or NULL if it is the root of a typed data tree. Defaults to NULL.

\Drupal\Core\TypedData\TraversableTypedDataInterface|null $parent: (optional) The parent object of the data property, or NULL if it is the root of a typed data tree. Defaults to NULL.

Overrides TypedDataInterface::setContext

File

core/modules/serialization/tests/src/Unit/Normalizer/ComplexDataNormalizerTest.php, line 134
Contains \Drupal\Tests\serialization\Unit\Normalizer\ComplexDataNormalizerTest.

Class

TestComplexData
Test class implementing ComplexDataInterface and IteratorAggregate.

Namespace

Drupal\Tests\serialization\Unit\Normalizer

Code

public function setContext($name = NULL, TraversableTypedDataInterface $parent = NULL) {
}