| @@ 166-177 (lines=12) @@ | ||
| 163 | * |
|
| 164 | * @return array |
|
| 165 | */ |
|
| 166 | public function getDatabaseArrayFromEntity(BlockEntity $entity) |
|
| 167 | { |
|
| 168 | return [ |
|
| 169 | 'id' => $entity->id, |
|
| 170 | 'page_id' => $entity->pageId, |
|
| 171 | 'title' => $entity->title, |
|
| 172 | 'html' => $entity->html, |
|
| 173 | 'position' => (int) $entity->position, |
|
| 174 | 'updated_at' => $entity->updatedAt->format(DateTime::ATOM), |
|
| 175 | 'active' => $entity->active |
|
| 176 | ]; |
|
| 177 | } |
|
| 178 | ||
| 179 | /** |
|
| 180 | * Prepares database array from properties. |
|
| @@ 164-175 (lines=12) @@ | ||
| 161 | * |
|
| 162 | * @return array |
|
| 163 | */ |
|
| 164 | public function getDatabaseArrayFromEntity(PageEntity $entity) |
|
| 165 | { |
|
| 166 | return [ |
|
| 167 | 'id' => $entity->id, |
|
| 168 | 'slug' => $entity->slug, |
|
| 169 | 'meta_keywords' => $entity->metaKeywords, |
|
| 170 | 'meta_description' => $entity->metaDescription, |
|
| 171 | 'meta_social' => $entity->metaSocial, |
|
| 172 | 'updated_at' => $entity->updatedAt->format(DateTime::ATOM), |
|
| 173 | 'active' => $entity->active |
|
| 174 | ]; |
|
| 175 | } |
|
| 176 | ||
| 177 | /** |
|
| 178 | * Prepares database array from properties. |
|