| @@ 179-191 (lines=13) @@ | ||
| 176 | * |
|
| 177 | * @return BlockEntity |
|
| 178 | */ |
|
| 179 | public function getEntityFromDatabaseArray(array $data) |
|
| 180 | { |
|
| 181 | $entity = new BlockEntity(); |
|
| 182 | $entity->id = (int) $data['id']; |
|
| 183 | $entity->pageId = (int) $data['page_id']; |
|
| 184 | $entity->title = $data['title']; |
|
| 185 | $entity->html = $data['html']; |
|
| 186 | $entity->position = (int) $data['position']; |
|
| 187 | $entity->updatedAt = new DateTime($data['updated_at']); |
|
| 188 | $entity->active = (bool) $data['active']; |
|
| 189 | ||
| 190 | return $entity; |
|
| 191 | } |
|
| 192 | } |
|
| 193 | ||
| @@ 175-187 (lines=13) @@ | ||
| 172 | * |
|
| 173 | * @return PageEntity |
|
| 174 | */ |
|
| 175 | public function getEntityFromDatabaseArray(array $data) |
|
| 176 | { |
|
| 177 | $entity = new PageEntity(); |
|
| 178 | $entity->id = (int) $data['id']; |
|
| 179 | $entity->slug = $data['slug']; |
|
| 180 | $entity->metaKeywords = $data['meta_keywords']; |
|
| 181 | $entity->metaDescription = $data['meta_description']; |
|
| 182 | $entity->metaSocial = $data['meta_social']; |
|
| 183 | $entity->updatedAt = new DateTime($data['updated_at']); |
|
| 184 | $entity->active = (bool) $data['active']; |
|
| 185 | ||
| 186 | return $entity; |
|
| 187 | } |
|
| 188 | } |
|
| 189 | ||