4646use App \Services \Parts \PartLotWithdrawAddHelper ;
4747use App \Services \Parts \PricedetailHelper ;
4848use App \Services \ProjectSystem \ProjectBuildPartHelper ;
49+ use App \Settings \BehaviorSettings \PartInfoSettings ;
4950use DateTime ;
5051use Doctrine \ORM \EntityManagerInterface ;
5152use Exception ;
@@ -69,7 +70,7 @@ public function __construct(protected PricedetailHelper $pricedetailHelper,
6970 protected PartPreviewGenerator $ partPreviewGenerator ,
7071 private readonly TranslatorInterface $ translator ,
7172 private readonly AttachmentSubmitHandler $ attachmentSubmitHandler , private readonly EntityManagerInterface $ em ,
72- protected EventCommentHelper $ commentHelper )
73+ protected EventCommentHelper $ commentHelper, private readonly PartInfoSettings $ partInfoSettings )
7374 {
7475 }
7576
@@ -119,8 +120,8 @@ public function show(Part $part, Request $request, TimeTravel $timeTravel, Histo
119120 'pricedetail_helper ' => $ this ->pricedetailHelper ,
120121 'pictures ' => $ this ->partPreviewGenerator ->getPreviewAttachments ($ part ),
121122 'timeTravel ' => $ timeTravel_timestamp ,
122- 'description_params ' => $ parameterExtractor ->extractParameters ($ part ->getDescription ()),
123- 'comment_params ' => $ parameterExtractor ->extractParameters ($ part ->getComment ()),
123+ 'description_params ' => $ this -> partInfoSettings -> extractParamsFromDescription ? $ parameterExtractor ->extractParameters ($ part ->getDescription ()) : [] ,
124+ 'comment_params ' => $ this -> partInfoSettings -> extractParamsFromNotes ? $ parameterExtractor ->extractParameters ($ part ->getComment ()) : [] ,
124125 'withdraw_add_helper ' => $ withdrawAddHelper ,
125126 ]
126127 );
0 commit comments