Skip to content

Commit

Permalink
Code style.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rekhyt committed Apr 4, 2024
1 parent 1cdfddd commit aabbf30
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/Backend/SgateShopgatePlugin/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -5331,16 +5331,20 @@ protected function createItems($limit = null, $offset = null, array $uids = arra

$list = $this->getExportArticles($limit, $offset, $uids);
$logMessage = 'Articles from DB: ' . $this->getHelper(self::HELPER_DATASTRUCTURE)->jsonEncode(array_map(function ($article) {
if ($article['id'] == 5568) $this->log('Found it! ' . $this->getHelper(self::HELPER_DATASTRUCTURE)->jsonEncode($article), ShopgateLogger::LOGTYPE_ACCESS);
return ['id' => $article['id'], 'mainDetailId' => $article['mainDetailId']];
}, $list));
if ($article['id'] == 5568) {
$this->log('Found it! ' . $this->getHelper(self::HELPER_DATASTRUCTURE)->jsonEncode($article), ShopgateLogger::LOGTYPE_ACCESS);
}
return ['id' => $article['id'], 'mainDetailId' => $article['mainDetailId']];
}, $list));
$this->log($logMessage, ShopgateLogger::LOGTYPE_ACCESS);

$articles = $this->eventManager->filter('sgate.export.items.createItems.article_load_after', $list, ['data' => $list]);
$logMessage = 'Articles after filter: ' . $this->getHelper(self::HELPER_DATASTRUCTURE)->jsonEncode(array_map(function ($article) {
if ($article['id'] == 5568) $this->log('Found it (filtered)! ' . $this->getHelper(self::HELPER_DATASTRUCTURE)->jsonEncode($article), ShopgateLogger::LOGTYPE_ACCESS);
return ['id' => $article['id'], 'mainDetailId' => $article['mainDetailId']];
}, $articles));
if ($article['id'] == 5568) {
$this->log('Found it (filtered)! ' . $this->getHelper(self::HELPER_DATASTRUCTURE)->jsonEncode($article), ShopgateLogger::LOGTYPE_ACCESS);
}
return ['id' => $article['id'], 'mainDetailId' => $article['mainDetailId']];
}, $articles));
$this->log($logMessage, ShopgateLogger::LOGTYPE_ACCESS);

$this->log(
Expand Down

0 comments on commit aabbf30

Please sign in to comment.