CodeExplorer getDisplayDate example
public function convertBlogStruct(Blog
$blog) { $data =
[ 'id' =>
$blog->
getId(),
'title' =>
$blog->
getTitle(),
'authorId' =>
$blog->
getAuthorId(),
'active' =>
$blog->
isActive(),
'shortDescription' =>
$blog->
getShortDescription(),
'description' =>
$blog->
getDescription(),
'displayDate' =>
$blog->
getDisplayDate(),
'categoryId' =>
$blog->
getCategoryId(),
'template' =>
$blog->
getTemplate(),
'metaKeyWords' =>
$blog->
getMetaKeywords(),
'metaKeywords' =>
$blog->
getMetaKeywords(),
'metaDescription' =>
$blog->
getMetaDescription(),
'metaTitle' =>
$blog->
getMetaTitle(),
'views' =>
$blog->
getViews(),
'mediaList' =>
array_map([$this, 'convertMediaStruct'
],
$blog->
getMedias()),
'attributes' =>
$blog->
getAttributes(),
];