Skip to content

Commit c9e38cb

Browse files
committedFeb 16, 2018
Improve blocktype payload by retrieving handles from c5 directory
1 parent e5d17ff commit c9e38cb

File tree

1 file changed

+4
-45
lines changed

1 file changed

+4
-45
lines changed
 

‎src/Centry/BlockType/Payload.php

+4-45
Original file line numberDiff line numberDiff line change
@@ -46,50 +46,9 @@ private function getBlockTypes()
4646

4747
private function getDefaultBlockTypeHandles()
4848
{
49-
return [
50-
"core_area_layout",
51-
"core_page_type_composer_control_output",
52-
"core_scrapbook_display",
53-
"core_stack_display",
54-
"core_conversation",
55-
"autonav",
56-
"content",
57-
"date_navigation",
58-
"external_form",
59-
"file",
60-
"page_attribute_display",
61-
"form",
62-
"page_title",
63-
"feature",
64-
"topic_list",
65-
"social_links",
66-
"testimonial",
67-
"share_this_page",
68-
"google_map",
69-
"html",
70-
"horizontal_rule",
71-
"image",
72-
"faq",
73-
"next_previous",
74-
"page_list",
75-
"rss_displayer",
76-
"search",
77-
"image_slider",
78-
"survey",
79-
"switch_language",
80-
"tags",
81-
"video",
82-
"youtube",
83-
"express_form",
84-
"express_entry_list",
85-
"express_entry_detail",
86-
"desktop_site_activity",
87-
"desktop_app_status",
88-
"desktop_featured_theme",
89-
"desktop_featured_addon",
90-
"desktop_newsflow_latest",
91-
"desktop_latest_form",
92-
"desktop_waiting_for_me",
93-
];
49+
// concrete/blocks
50+
$directory = DIR_BASE_CORE . DIRECTORY_SEPARATOR . DIRNAME_BLOCKS;
51+
52+
return array_values(array_diff(scandir($directory), array('..', '.')));
9453
}
9554
}

0 commit comments

Comments
 (0)
Please sign in to comment.