/** * @param \Spryker\Zed\Gui\Communication\Table\TableConfiguration $config * * @return array */ protected function prepareData(TableConfiguration $config) { $keys = $this->storageClient->getAllKeys(); sort($keys); $result = []; foreach ($keys as $i => $key) { $keys[$i] = str_replace('kv:', '', $key); } $values = $this->storageClient->getMulti($keys); $fixedValues = []; foreach ($values as $i => $value) { $i = str_replace('kv:', '', $i); $fixedValues[$i] = $value; } $values = $fixedValues; foreach ($values as $key => $value) { $url = Url::generate('/storage/maintenance/key', ['key' => $key]); $result[] = ['key' => '<a href="' . $url . '">' . Html::escape($key) . '</a>', 'value' => substr($value, 0, 200)]; } $this->setTotal(count($result)); return $result; }