Back to Opencart

File catalog\model\design\translation.php

docs/api/source-catalog.model.design.translation.html

4.1.0.33.3 KB
Original Source

Namespaces

Classes

| 1: | <?php | | 2: | namespace Opencart\Catalog\Model\Design; | | 3: | /** | | 4: | * Class Translation | | 5: | * | | 6: | * @package Opencart\Catalog\Model\Design | | 7: | */ | | 8: | class Translation extends \Opencart\System\Engine\Model { | | 9: | /** | | 10: | * Get Translations | | 11: | * | | 12: | * @param string $route | | 13: | * | | 14: | * @return array<int, array<string, mixed>> | | 15: | */ | | 16: | public function getTranslations(string $route): array { | | 17: | $query = $this->db->query("SELECT * FROM " . DB\_PREFIX . "translation WHERE store\_id = '" . (int)$this->config->get('config_store_id') . "' AND language_id = '" . (int)$this->config->get('config_language_id') . "' AND route = '" . $this->db->escape($route) . "'"); | | 18: | | | 19: | return $query->rows; | | 20: | } | | 21: | } | | 22: | |

OpenCart API API documentation generated by ApiGen dev-master