Gc\Core\Translator::getValue PHP Method

getValue() public method

Get config value
public getValue ( string $source, string $locale = null ) : string
$source string Source
$locale string Optional locale
return string value
    public function getValue($source, $locale = null)
    {
        $select = new Select();
        $select->from('core_translate')->columns(array('src_id' => 'id', 'source'))->join('core_translate_locale', 'core_translate.id = core_translate_locale.core_translate_id', array('dst_id' => 'id', 'destination', 'locale'), Select::JOIN_INNER);
        if (!empty($source)) {
            $select->where(array('core_translate.source' => $source));
        }
        if (!empty($locale)) {
            $select->where(array('core_translate_locale.locale' => $locale));
        }
        return $this->fetchRow($select);
    }