Ensure the right order
[MAILPOET-1480]
This commit is contained in:
@ -31,8 +31,9 @@ class NewsletterTemplates extends APIEndpoint {
|
|||||||
function getAll() {
|
function getAll() {
|
||||||
$collection = NewsletterTemplate
|
$collection = NewsletterTemplate
|
||||||
::selectExpr('id, categories, thumbnail, name, description, readonly')
|
::selectExpr('id, categories, thumbnail, name, description, readonly')
|
||||||
|
->orderByAsc('readonly')
|
||||||
->orderByDesc('created_at')
|
->orderByDesc('created_at')
|
||||||
->orderByAsc('name')
|
->orderByDesc('id')
|
||||||
->findMany();
|
->findMany();
|
||||||
$templates = array_map(function($item) {
|
$templates = array_map(function($item) {
|
||||||
return $item->asArray();
|
return $item->asArray();
|
||||||
|
@ -35,43 +35,46 @@ class Populator {
|
|||||||
'NewsletterBlank12Column',
|
'NewsletterBlank12Column',
|
||||||
'NewsletterBlank121Column',
|
'NewsletterBlank121Column',
|
||||||
'NewsletterBlank13Column',
|
'NewsletterBlank13Column',
|
||||||
'PostNotificationsBlank1Column',
|
|
||||||
'WelcomeBlank1Column',
|
|
||||||
'WelcomeBlank12Column',
|
|
||||||
'SimpleText',
|
'SimpleText',
|
||||||
'AppWelcome',
|
|
||||||
'WorldCup',
|
|
||||||
'FoodBox',
|
|
||||||
'TakeAHike',
|
'TakeAHike',
|
||||||
'FestivalEvent',
|
|
||||||
'PieceOfCake',
|
|
||||||
'Shoes',
|
|
||||||
'ScienceWeekly',
|
|
||||||
'Faith',
|
'Faith',
|
||||||
'NewsDay',
|
'NewsDay',
|
||||||
'YogaStudio',
|
'WorldCup',
|
||||||
'FashionStore',
|
'FoodBox',
|
||||||
'Charity',
|
'FestivalEvent',
|
||||||
|
'RetroComputingMagazine',
|
||||||
|
'Shoes',
|
||||||
|
'PieceOfCake',
|
||||||
|
'Coffee',
|
||||||
'Drone',
|
'Drone',
|
||||||
|
'Retro',
|
||||||
'Hotels',
|
'Hotels',
|
||||||
'Music',
|
'Music',
|
||||||
'Retro',
|
'YogaStudio',
|
||||||
'Coffee',
|
'Charity',
|
||||||
'RetroComputingMagazine',
|
'FashionStore',
|
||||||
'RealEstate',
|
|
||||||
|
'WelcomeBlank1Column',
|
||||||
|
'WelcomeBlank12Column',
|
||||||
'GiftWelcome',
|
'GiftWelcome',
|
||||||
'Minimal',
|
'Minimal',
|
||||||
'Phone',
|
'Phone',
|
||||||
'Sunglasses',
|
'Sunglasses',
|
||||||
|
'RealEstate',
|
||||||
|
'AppWelcome',
|
||||||
|
|
||||||
|
'PostNotificationsBlank1Column',
|
||||||
'ModularStyleStories',
|
'ModularStyleStories',
|
||||||
'NotSoMedium',
|
'NotSoMedium',
|
||||||
'RssSimpleNews',
|
'RssSimpleNews',
|
||||||
'WideStoryLayout',
|
'WideStoryLayout',
|
||||||
'Avocado',
|
'ScienceWeekly',
|
||||||
|
|
||||||
|
'WineCity',
|
||||||
'DogFood',
|
'DogFood',
|
||||||
'Fitness',
|
'Fitness',
|
||||||
'KidsClothing',
|
'KidsClothing',
|
||||||
'WineCity',
|
'Avocado',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user