diff --git a/src/Entity/Book.php b/src/Entity/Book.php index 6c1fa40..dbd3ed3 100644 --- a/src/Entity/Book.php +++ b/src/Entity/Book.php @@ -86,7 +86,13 @@ public static function getEntitiesFromArray(array $array) { $entities = array(); foreach ($array as $object) { - $entities[] = self::objectTransformer($object); + if (in_array( + $object['_type'], + array(self::TYPE_PDF, self::TYPE_AUDIO, self::TYPE_VIDEO), + true) + ) { + $entities[] = self::objectTransformer($object); + } } return $entities;