Fix document substitution

This commit is contained in:
Thibaud Fabre
2016-11-24 17:21:11 +01:00
parent 97e08d91f4
commit d00d674cdf
6 changed files with 13 additions and 2 deletions

View File

@@ -656,10 +656,12 @@ class media_subdef extends media_abstract implements cache_cacheableInterface
$params['height'] = $media->getHeight();
}
/** @var callable $factoryProvider */
$factoryProvider = $app['provider.factory.media_subdef'];
$factory = $factoryProvider($record->getDataboxId());
$subdef = $factory($params);
Assertion::isInstanceOf($subdef, \media_subdef::class);
$repository = self::getMediaSubdefRepository($app, $record->getDataboxId());