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;
    }