File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 16
16
],
17
17
],
18
18
],
19
+ 'book_visual_placeholder_url ' => asset ('/img/book-placeholder.png ' ),
19
20
];
Original file line number Diff line number Diff line change @@ -64,12 +64,12 @@ public function canBeOrdered(): bool
64
64
&& ($ this ->hasStock () || $ this ->availability == BookAvailability::AvailableOnDemand);
65
65
}
66
66
67
- public function visual (string $ size ): string
67
+ public function visual (string $ size, ? string $ placeholder = null ): ? string
68
68
{
69
- $ url = $ this ->visuals [$ size ];
69
+ $ url = $ this ->visuals [$ size ] ?? null ;
70
70
71
71
if (preg_match ('/no_image\.png/ ' , $ url )) {
72
- return asset ( ' /img/book-placeholder.png ' );
72
+ return $ placeholder ?? config ( ' titelive-client.book_visual_placeholder_url ' );
73
73
}
74
74
75
75
return $ url ;
You can’t perform that action at this time.
0 commit comments