MCPcopy Create free account
hub / github.com/Rello/analytics / update

Method update

lib/Db/PanoramaMapper.php:154–167  ·  view source on GitHub ↗

* update report * @param $id * @param $name * @param $type * @param $parent * @param $pages * @return bool * @throws Exception */

($id, $name, $type, $parent, $pages)

Source from the content-addressed store, hash-verified

152 * @throws Exception
153 */
154 public function update($id, $name, $type, $parent, $pages)
155 {
156 $name = $this->truncate($name, 64);
157 $sql = $this->db->getQueryBuilder();
158 $sql->update(self::TABLE_NAME)
159 ->set('name', $sql->createNamedParameter($name))
160 ->set('type', $sql->createNamedParameter($type))
161 ->set('parent', $sql->createNamedParameter($parent))
162 ->set('pages', $sql->createNamedParameter($pages))
163 ->where($sql->expr()->eq('user_id', $sql->createNamedParameter($this->userId)))
164 ->andWhere($sql->expr()->eq('id', $sql->createNamedParameter($id)));
165 $sql->executeStatement();
166 return true;
167 }
168
169 /**
170 * delete report

Callers 2

updateGroupMethod · 0.45
updateNameMethod · 0.45

Calls 2

truncateMethod · 0.95
setMethod · 0.80

Tested by

no test coverage detected