Get the fields (fieldLayout) of the section. Not the entry Can I get all the fields of a section? For example, I have channel events, I want the fields in that section, but not related to any specific event.

I want to know all the fields (not the values), before actually executing the query.
You can't get the fields from a section since sections have no field layout. Sections have several entry types and those are responsible for the fields.

$entryType-&gt;getFieldLayout()-&gt;getFields();


You can get all types in a section with

$section-&gt;getEntryTypes();