File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
app/code/Magento/Eav/Model/Entity Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
-
7
6
namespace Magento \Eav \Model \Entity ;
8
7
9
8
use Magento \Framework \Api \AttributeValueFactory ;
@@ -295,6 +294,12 @@ public function beforeSave()
295
294
}
296
295
}
297
296
297
+ if ($ this ->getFrontendInput () == 'media_image ' ) {
298
+ if (!$ this ->getFrontendModel ()) {
299
+ $ this ->setFrontendModel (\Magento \Catalog \Model \Product \Attribute \Frontend \Image::class);
300
+ }
301
+ }
302
+
298
303
if ($ this ->getBackendType () == 'gallery ' ) {
299
304
if (!$ this ->getBackendModel ()) {
300
305
$ this ->setBackendModel (\Magento \Eav \Model \Entity \Attribute \Backend \DefaultBackend::class);
@@ -316,7 +321,7 @@ public function afterSave()
316
321
}
317
322
318
323
/**
319
- * @return $this
324
+ * @inheritdoc
320
325
* @since 100.0.7
321
326
*/
322
327
public function afterDelete ()
You can’t perform that action at this time.
0 commit comments