Update BookmarkMapper.php
indent this function properly line 39-55.
This commit is contained in:
parent
ec7597142c
commit
1ae0fad1ea
@ -36,23 +36,23 @@ class BookmarkMapper extends ReaderMapper {
|
|||||||
* @param string $name
|
* @param string $name
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function get($fileId, $name, $type = null) {
|
public function get($fileId, $name, $type = null) {
|
||||||
$query = $this->db->getQueryBuilder();
|
$query = $this->db->getQueryBuilder();
|
||||||
$query->select('*')
|
$query->select('*')
|
||||||
->from($this->getTableName())
|
->from($this->getTableName())
|
||||||
->where($query->expr()->eq('file_id', $query->createNamedParameter($fileId)))
|
->where($query->expr()->eq('file_id', $query->createNamedParameter($fileId)))
|
||||||
->andWhere($query->expr()->eq('user_id', $query->createNamedParameter($this->userId)));
|
->andWhere($query->expr()->eq('user_id', $query->createNamedParameter($this->userId)));
|
||||||
|
|
||||||
if ($type !== null) {
|
if ($type !== null) {
|
||||||
$query->andWhere($query->expr()->eq('type', $query->createNamedParameter($type)));
|
$query->andWhere($query->expr()->eq('type', $query->createNamedParameter($type)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($name !== null) {
|
if ($name !== null) {
|
||||||
$query->andWhere($query->expr()->eq('name', $query->createNamedParameter($name)));
|
$query->andWhere($query->expr()->eq('name', $query->createNamedParameter($name)));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->findEntities($query);
|
return $this->findEntities($query);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief write bookmark to database
|
* @brief write bookmark to database
|
||||||
|
Reference in New Issue
Block a user