Skip to content

Commit 447e45b

Browse files
committed
add many items in the demo stack to showcase the pagination
1 parent cb95cbd commit 447e45b

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

demo/application/config/packages/joli_media_easy_admin.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
joli_media_easy_admin:
2+
pagination:
3+
per_page: 20
24
visibility:
35
show_variations_list: true
46
show_variations_list_admin_variations: true

demo/application/config/packages/joli_media_sonata_admin.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
joli_media_sonata_admin:
2+
pagination:
3+
per_page: 25
24
visibility:
35
show_variations_list: true
46
show_variations_list_admin_variations: true

demo/application/src/DataFixtures/MediaFixtures.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,17 @@ class MediaFixtures extends Fixture
1111
#[\Override]
1212
public function load(ObjectManager $manager): void
1313
{
14+
$mediaRoot = __DIR__ . '/../../public/media/original';
1415
$filesystem = new Filesystem();
15-
$filesystem->mirror(
16-
__DIR__ . '/media',
17-
__DIR__ . '/../../public/media/original'
18-
);
16+
$filesystem->mirror(__DIR__ . '/media', $mediaRoot);
17+
18+
$filesystem->mkdir($mediaRoot . '/many-files');
19+
20+
for ($i = 0; $i < 100; ++$i) {
21+
$filesystem->copy(
22+
__DIR__ . '/media/articles/circle-pattern.png',
23+
$mediaRoot . '/many-files/circle-pattern-' . $i . '.png',
24+
);
25+
}
1926
}
2027
}

demo/application/src/DataFixtures/PostFixtures.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function load(ObjectManager $manager): void
2828
{
2929
$extensions = ['avif', 'gif', 'jpeg', 'png', 'webp'];
3030

31-
for ($i = 0; $i < 10; ++$i) {
31+
for ($i = 0; $i < 100; ++$i) {
3232
$extension = $extensions[$this->faker->numberBetween(0, \count($extensions) - 1)];
3333
$media = $this->resolver->resolve('articles/circle-pattern.' . $extension);
3434
$paragraphs = [];

0 commit comments

Comments
 (0)