@@ 64-79 (lines=16) @@ | ||
61 | * |
|
62 | * @return LanguageEntity[] |
|
63 | */ |
|
64 | public function fetchAllTranslated() |
|
65 | { |
|
66 | $statement = $this->connection->createQueryBuilder() |
|
67 | ->select('*') |
|
68 | ->from(self::TABLE) |
|
69 | ->where('is_translated = 1') |
|
70 | ->execute(); |
|
71 | ||
72 | $result = $statement->fetchAll(); |
|
73 | ||
74 | if ($result === false) { |
|
75 | return null; |
|
76 | } |
|
77 | ||
78 | return $this->getEntityArrayFromDatabaseArray($result); |
|
79 | } |
|
80 | ||
81 | /** |
|
82 | * Creates a language in the database. |
@@ 66-82 (lines=17) @@ | ||
63 | * |
|
64 | * @return null|UserEntity |
|
65 | */ |
|
66 | public function fetchOneById($id) |
|
67 | { |
|
68 | $statement = $this->connection->createQueryBuilder() |
|
69 | ->select('*') |
|
70 | ->from(self::TABLE) |
|
71 | ->where('user_id = :id') |
|
72 | ->setParameter(':id', $id) |
|
73 | ->execute(); |
|
74 | ||
75 | $result = $statement->fetch(); |
|
76 | ||
77 | if ($result === false) { |
|
78 | return null; |
|
79 | } |
|
80 | ||
81 | return $this->getEntityFromDatabaseArray($result); |
|
82 | } |
|
83 | ||
84 | /** |
|
85 | * Creates a user in the database. |