return $this->eventManager->
filter('Legacy_Struct_Converter_Convert_Media',
$data,
[ 'media' =>
$media,
]);
} /**
* @return array
*/
public function convertUnitStruct(Unit
$unit) { $data =
[ 'minpurchase' =>
$unit->
getMinPurchase(),
'maxpurchase' =>
$unit->
getMaxPurchase() ?:
$this->config->
get('maxPurchase'
),
'purchasesteps' =>
$unit->
getPurchaseStep() ?: 1,
'purchaseunit' =>
$unit->
getPurchaseUnit(),
'referenceunit' =>
$unit->
getReferenceUnit(),
'packunit' =>
$unit->
getPackUnit(),
'unitID' =>
$unit->
getId(),
'sUnit' =>
[ 'unit' =>
$unit->
getUnit(),
'description' =>
$unit->
getName(),
],
'unit_attributes' =>
$unit->
getAttributes(),
];