function StorageCopyTraitTest::toArray
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php \Drupal\Tests\Core\Config\StorageCopyTraitTest::toArray()
- 8.9.x core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php \Drupal\Tests\Core\Config\StorageCopyTraitTest::toArray()
- 11.x core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php \Drupal\Tests\Core\Config\StorageCopyTraitTest::toArray()
Get the protected config data out of a MemoryStorage.
Parameters
\Drupal\Core\Config\MemoryStorage $storage: The config storage to extract the data from.
Return value
array
1 call to StorageCopyTraitTest::toArray()
- StorageCopyTraitTest::testReplaceStorageContents in core/
tests/ Drupal/ Tests/ Core/ Config/ StorageCopyTraitTest.php - @covers ::replaceStorageContents
File
-
core/
tests/ Drupal/ Tests/ Core/ Config/ StorageCopyTraitTest.php, line 89
Class
- StorageCopyTraitTest
- @coversDefaultClass \Drupal\Core\Config\StorageCopyTrait @group Config
Namespace
Drupal\Tests\Core\ConfigCode
protected static function toArray(MemoryStorage $storage) {
$reflection = new \ReflectionObject($storage);
$property = $reflection->getProperty('config');
return $property->getValue($storage)
->getArrayCopy();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.