File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed
app/code/Magento/Catalog/Model Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ public function __construct(array $blackList = [])
28
28
/**
29
29
* Delete custom attribute
30
30
*
31
- * @param array $attributes
31
+ * @param array $attributes set objects attributes @example ['attribute_code'=>'attribute_object']
32
32
* @return array
33
33
*/
34
34
public function execute (array $ attributes ): array
Original file line number Diff line number Diff line change @@ -506,13 +506,16 @@ protected function _getResource()
506
506
protected function getCustomAttributesCodes ()
507
507
{
508
508
if ($ this ->customAttributesCodes === null ) {
509
- $ this ->customAttributesCodes = array_keys ($ this ->eavConfig ->getEntityAttributes (
510
- self ::ENTITY ,
511
- $ this
512
- ));
513
-
514
- $ this ->customAttributesCodes = $ this ->filterCustomAttribute ->execute ($ this ->customAttributesCodes );
515
- $ this ->customAttributesCodes = array_diff ($ this ->customAttributesCodes , ProductInterface::ATTRIBUTES );
509
+ $ this ->customAttributesCodes = array_diff (
510
+ array_keys (
511
+ $ this ->filterCustomAttribute ->execute (
512
+ $ this ->eavConfig ->getEntityAttributes (
513
+ self ::ENTITY ,
514
+ $ this
515
+ )
516
+ )
517
+ ), ProductInterface::ATTRIBUTES
518
+ );
516
519
}
517
520
518
521
return $ this ->customAttributesCodes ;
You can’t perform that action at this time.
0 commit comments