@@ -79,28 +79,30 @@ class AbstractAction
79
79
/**
80
80
* @var SkipStaticColumnsProvider
81
81
*/
82
- private $ staticColumnsProvider ;
82
+ private $ skipStaticColumnsProvider ;
83
83
84
84
/**
85
85
* @param ResourceConnection $resource
86
86
* @param StoreManagerInterface $storeManager
87
87
* @param Helper $resourceHelper
88
- * @param MetadataPool|null $categoryMetadata
89
- * @param SkipStaticColumnsProvider|null $provider
88
+ * @param MetadataPool|null $metadataPool
89
+ * @param SkipStaticColumnsProvider|null $skipStaticColumnsProvider
90
90
*/
91
91
public function __construct (
92
92
ResourceConnection $ resource ,
93
93
StoreManagerInterface $ storeManager ,
94
94
Helper $ resourceHelper ,
95
- MetadataPool $ categoryMetadata = null ,
96
- SkipStaticColumnsProvider $ provider = null
95
+ MetadataPool $ metadataPool = null ,
96
+ SkipStaticColumnsProvider $ skipStaticColumnsProvider = null
97
97
) {
98
98
$ this ->resource = $ resource ;
99
99
$ this ->connection = $ resource ->getConnection ();
100
100
$ this ->storeManager = $ storeManager ;
101
101
$ this ->resourceHelper = $ resourceHelper ;
102
- $ this ->categoryMetadata = $ categoryMetadata ?: ObjectManager::getInstance ()->get (MetadataPool::class);
103
- $ this ->staticColumnsProvider = $ provider ?: ObjectManager::getInstance ()->get (SkipStaticColumnsProvider::class);
102
+ $ metadataPool = $ metadataPool ?? ObjectManager::getInstance ()->get (MetadataPool::class);
103
+ $ this ->categoryMetadata = $ metadataPool ->getMetadata (CategoryInterface::class);
104
+ $ this ->skipStaticColumnsProvider = $ skipStaticColumnsProvider
105
+ ?? ObjectManager::getInstance ()->get (SkipStaticColumnsProvider::class);
104
106
$ this ->columns = array_merge ($ this ->getStaticColumns (), $ this ->getEavColumns ());
105
107
}
106
108
@@ -522,14 +524,14 @@ protected function getTableName($name)
522
524
}
523
525
524
526
/**
525
- * Get skip static columns instance .
527
+ * Gets skipped static columns.
526
528
*
527
529
* @return array
528
530
*/
529
531
private function getSkipStaticColumns ()
530
532
{
531
- if ([] === $ this ->skipStaticColumns ) {
532
- $ this ->skipStaticColumns = $ this ->staticColumnsProvider ->get ();
533
+ if ($ this ->skipStaticColumns === [] ) {
534
+ $ this ->skipStaticColumns = $ this ->skipStaticColumnsProvider ->get ();
533
535
}
534
536
return $ this ->skipStaticColumns ;
535
537
}
0 commit comments