File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
modules/custom/wxt_ext/wxt_ext_media/src/Plugin/EntityBrowser/Widget Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -104,15 +104,15 @@ protected function getCurrentEntity(FormStateInterface $form_state) {
104104 }
105105
106106 if ($ value && $ type ) {
107- // Check if media entity is already in form_state
107+ // Check if media entity is already in form_state.
108108 if ($ media = $ form_state ->get ('media_entity ' )) {
109- // Use it;
109+ // Use it.
110110 $ this ->selectEntities ([$ media ], $ form_state );
111111 $ form_state ->set ('media_entity ' , $ media );
112112 return $ media ;
113113 }
114114
115- // Create the media entity
115+ // Create the media entity.
116116 $ media = $ this ->createMedia ($ value , $ types [$ type ]);
117117 $ media ->save ();
118118 \Drupal::logger ('wxt_ext_media ' )->notice (
@@ -125,7 +125,7 @@ protected function getCurrentEntity(FormStateInterface $form_state) {
125125
126126 $ this ->selectEntities ([$ media ], $ form_state );
127127
128- // Store the media entity in form_state so it persists across AJAX calls
128+ // Store the media entity in form_state so it persists across AJAX calls.
129129 $ form_state ->set ('media_entity ' , $ media );
130130
131131 return $ media ;
You can’t perform that action at this time.
0 commit comments