Result of custom sql query needs displayed in table format. The custom query unifies results from two entities (which is not possible through views UI) and creates an html table.
A settings form needs to be created that would provide an ability to
Hide/show all available columns in this table.
Provide an ability to customize the display formats for each column in # 1 (for example time in different formats, description trimmed or full, etc). This will be similar to Manage Display UI
How can #2 be accomplished programmatically? Essentially replicate Manage Display like capability on a custom settings form.
Should this table, instead be generated using views which inherently provides hiding/formatting options via Views UI? If so, how can the views query be supplanted by the custom query which merges and unifies two entities?
Also like to avoid using Display Suite module and stick to core modules.