Prado\I18N\core\MessageSource_Database::isValidSource PHP Метод

isValidSource() защищенный Метод

Check if a particular catalogue+variant exists in the database.
protected isValidSource ( $variant ) : boolean
Результат boolean true if the catalogue+variant is in the database, false otherwise.
    protected function isValidSource($variant)
    {
        $command = $this->getDBConnection()->createCommand('SELECT COUNT(*) FROM catalogue WHERE name = :variant');
        $command->bindParameter(':variant', $variant, PDO::PARAM_STR);
        return $command->queryScalar() == 1;
    }