getStorage() public method

Returns the storage for $typeName.
public getStorage ( string $typeName ) : eZ\Publish\SPI\FieldType\FieldStorage
$typeName string
return eZ\Publish\SPI\FieldType\FieldStorage
Example #1
0
 /**
  * Deletes data for field $ids from external storage of $fieldType
  *
  * @param string $fieldType
  * @param \eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo
  * @param mixed[] $ids
  *
  * @return void
  */
 public function deleteFieldData($fieldType, VersionInfo $versionInfo, array $ids)
 {
     $this->storageRegistry->getStorage($fieldType)->deleteFieldData($versionInfo, $ids, $this->context);
 }
 /**
  * @return void
  * @covers eZ\Publish\Core\Persistence\Legacy\Content\StorageRegistry::getStorage
  * @covers eZ\Publish\Core\Persistence\Legacy\Exception\StorageNotFound
  */
 public function testGetNotFound()
 {
     $registry = new StorageRegistry(array());
     self::assertInstanceOf('eZ\\Publish\\Core\\FieldType\\NullStorage', $registry->getStorage('not-found'));
 }