![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/app/code/Soon/Faq/Helper/ |
<?php /** * This file is part of Soon_Faq for Magento2. * * @license All rights reserved * @author Krzysztof Majkowski <[email protected]> * @category Soon * @package Soon_Faq * @copyright Copyright (c) 2017 Agence Soon (http://www.agence-soon.fr) */ namespace Soon\Faq\Helper; use Soon\Faq\Helper\Config as FaqConfig; use Magento\Framework\App\Helper\AbstractHelper; /** * Class Data * @package Soon\Faq\Helper */ class Data extends AbstractHelper { /** * Get store prefix * * @param int $storeId * @return string */ public function getStoreCodePrefix($storeId) { $prefix = $this->scopeConfig->getValue(FaqConfig::XML_PATH_SOON_FAQ_CATEGORY_PREFIX_PREFIX); if (!is_null($prefix)) { $prefix = unserialize($prefix); if (isset($prefix[$storeId])) { return strtoupper($prefix[$storeId]); } } return null; } /** * Get format from config * * @return mixed */ public function getFormat() { return $this->scopeConfig->getValue(FaqConfig::XML_PATH_SOON_FAQ_CATEGORY_PREFIX_FORMAT); } }