load_listings(); return \KdxDirectoryWidget::render($listings, 'cry01'); } private function load_listings() { $config = $this->load_config(); $path = $config['listings_file'] ?? 'addon/cry01/listings.json'; $raw = @file_get_contents($path); if ($raw === false) return ['core' => [], 'tier1' => [], 'tier2' => [], 'other' => []]; $data = json_decode($raw, true); return (json_last_error() === JSON_ERROR_NONE) ? $data : ['core' => [], 'tier1' => [], 'tier2' => [], 'other' => []]; } private function load_config() { if (!function_exists('cry01_load_config')) { require_once 'addon/cry01/cry01_chain.php'; } return cry01_load_config(); } }