src/Attribute/TranslatedSelect.php
public function searchForInLanguages($strPattern, $arrLanguages = [])
    {
        $objDB              = $this->getDatabase();
        $strTableNameId     = $this->getSelectSource();
        $strColNameId       = $this->getIdColumn();
        $strColNameLangCode = $this->getLanguageColumn();
        $strColValue        = $this->getValueColumn();
        $strColAlias        = $this->getAliasColumn();
        $strColNameWhere    = $this->getAdditionalWhere();
        $arrReturn          = [];

        if ($strTableNameId && $strColNameId) {
            $strMetaModelTableName   = $this->getMetaModel()->getTableName();
            $strMetaModelTableNameId = $strMetaModelTableName.'_id';

            $strPattern = \str_replace(['*', '?'], ['%', '_'], $strPattern);

            // Using aliased join here to resolve issue #3 for normal select attributes
            // (SQL error for self referencing table).
            $objValue = $objDB->prepare(\sprintf(
                'SELECT sourceTable.*, %2$s.id AS %3$s
                FROM %1$s sourceTable
                RIGHT JOIN %2$s ON (sourceTable.%4$s=%2$s.%5$s)
                WHERE '.($arrLanguages ? '(sourceTable.%6$s IN (%7$s))' : '').'
                AND (sourceTable.%8$s LIKE ? OR sourceTable.%9$s LIKE ?) %10$s',
                // @codingStandardsIgnoreStart - we want to keep the numbers at the end of the lines below.
                $strTableNameId,                                      // 1
                $strMetaModelTableName,                               // 2
                $strMetaModelTableNameId,                             // 3
                $strColNameId,                                        // 4
                $this->getColName(),                                  // 5
                $strColNameLangCode,                                  // 6
                '\'' . \implode('\',\'', $arrLanguages) . '\'',        // 7
                $strColValue,                                         // 8
                $strColAlias,                                         // 9
                ($strColNameWhere ? ('AND ' . $strColNameWhere) : '') // 10
            // @codingStandardsIgnoreEnd
            ))
            ->execute($strPattern, $strPattern);

            while ($objValue->next()) {
                $arrReturn[] = $objValue->$strMetaModelTableNameId;
            }
        }
        return $arrReturn;
    }
public function searchForInLanguages($strPattern, $arrLanguages = [])
    {
        $objDB              = $this->getDatabase();
        $strTableNameId     = $this->getSelectSource();
        $strColNameId       = $this->getIdColumn();
        $strColNameLangCode = $this->getLanguageColumn();
        $strColValue        = $this->getValueColumn();
        $strColAlias        = $this->getAliasColumn();
        $strColNameWhere    = $this->getAdditionalWhere();
        $arrReturn          = [];

        if ($strTableNameId && $strColNameId) {
            $strMetaModelTableName   = $this->getMetaModel()->getTableName();
            $strMetaModelTableNameId = $strMetaModelTableName.'_id';

            $strPattern = \str_replace(['*', '?'], ['%', '_'], $strPattern);

            // Using aliased join here to resolve issue #3 for normal select attributes
            // (SQL error for self referencing table).
            $objValue = $objDB->prepare(\sprintf(
                'SELECT sourceTable.*, %2$s.id AS %3$s
                FROM %1$s sourceTable
                RIGHT JOIN %2$s ON (sourceTable.%4$s=%2$s.%5$s)
                WHERE '.($arrLanguages ? '(sourceTable.%6$s IN (%7$s))' : '').'
                AND (sourceTable.%8$s LIKE ? OR sourceTable.%9$s LIKE ?) %10$s',
                // @codingStandardsIgnoreStart - we want to keep the numbers at the end of the lines below.
                $strTableNameId,                                      // 1
                $strMetaModelTableName,                               // 2
                $strMetaModelTableNameId,                             // 3
                $strColNameId,                                        // 4
                $this->getColName(),                                  // 5
                $strColNameLangCode,                                  // 6
                '\'' . \implode('\',\'', $arrLanguages) . '\'',        // 7
                $strColValue,                                         // 8
                $strColAlias,                                         // 9
                ($strColNameWhere ? ('AND ' . $strColNameWhere) : '') // 10
            // @codingStandardsIgnoreEnd
            ))
            ->execute($strPattern, $strPattern);

            while ($objValue->next()) {
                $arrReturn[] = $objValue->$strMetaModelTableNameId;
            }
        }
        return $arrReturn;
    }
public function searchForInLanguages ( $ strPattern , $ arrLanguages = [ ] ) { $ objDB = $ this -> getDatabase ( ) ; $ strTableNameId = $ this -> getSelectSource ( ) ; $ strColNameId = $ this -> getIdColumn ( ) ; $ strColNameLangCode = $ this -> getLanguageColumn ( ) ; $ strColValue = $ this -> getValueColumn ( ) ; $ strColAlias = $ this -> getAliasColumn ( ) ; $ strColNameWhere = $ this -> getAdditionalWhere ( ) ; $ arrReturn = [ ] ; if ( $ strTableNameId && $ strColNameId ) { $ strMetaModelTableName = $ this -> getMetaModel ( ) -> getTableName ( ) ; $ strMetaModelTableNameId = $ strMetaModelTableName . '_id' ; $ strPattern = \ str_replace ( [ '*' , '?' ] , [ '%' , '_' ] , $ strPattern ) ; // Using aliased join here to resolve issue #3 for normal select attributes // (SQL error for self referencing table). $ objValue = $ objDB -> prepare ( \ sprintf ( 'SELECT sourceTable.*, %2$s.id AS %3$s
                FROM %1$s sourceTable
                RIGHT JOIN %2$s ON (sourceTable.%4$s=%2$s.%5$s)
                WHERE ' . ( $ arrLanguages ? '(sourceTable.%6$s IN (%7$s))' : '' ) . '
                AND (sourceTable.%8$s LIKE ? OR sourceTable.%9$s LIKE ?) %10$s' , // @codingStandardsIgnoreStart - we want to keep the numbers at the end of the lines below. $ strTableNameId , // 1 $ strMetaModelTableName , // 2 $ strMetaModelTableNameId , // 3 $ strColNameId , // 4 $ this -> getColName ( ) , // 5 $ strColNameLangCode , // 6 '\'' . \ implode ( '\',\'' , $ arrLanguages ) . '\'' , // 7 $ strColValue , // 8 $ strColAlias , // 9 ( $ strColNameWhere ? ( 'AND ' . $ strColNameWhere ) : '' ) // 10 // @codingStandardsIgnoreEnd ) ) -> execute ( $ strPattern , $ strPattern ) ; while ( $ objValue -> next ( ) ) { $ arrReturn [ ] = $ objValue -> $ strMetaModelTableNameId ; } } return $ arrReturn ; }
{@inheritdoc}

Search the attribute in the given languages.
{ @inheritdoc }