public function batchDelete($data) { if (!
$this instanceof BatchInterface
) { throw new BatchInterfaceNotImplementedException();
} $results =
[];
foreach ($data as $key =>
$datum) { $id =
$this->
getIdByData($datum);
try { $results[$key] =
[ 'success' => true,
'operation' => 'delete',
'data' =>
$this->
delete($id),
];
if ($this->
getResultMode() === self::HYDRATE_ARRAY
) { $results[$key]['data'
] =
Shopware()->
Models()->
toArray( $results[$key]['data'
] );
}