The Extension File Structure enables Symphony to detect and load extension files automatically.
The Extension File Structure is a set of layout and naming conventions for extension files that enables them to be automatically detected and loaded by Symphony.
When creating an extension, simply follow the conventions outlined below.
Extensions should be structured as follows. Note that the only required file is extension.driver.php. The remaining directories and files can be included as needed.
yourextension/ assets/ sample.js sample.css content/ content.index.php content.sample.php data-sources/ datasource.sample.php events/ event.sample.php fields/ field.sample.php lang/ lang.de.php lang.es.php lib/ yourphplibs.php text-formatters/ formatter.sample.php extension.driver.php license README
The files in the content directory are autoincluded and used to render back-end pages. The file content.sample.php would render a page at
/symphony/extension/yourextension/sample. content.index.php is viewable at
Any data sources to be provided by an extension must be placed here for auto-inclusion.
Any events to be provided by an extension must be placed here for auto-inclusion.
Any field types to be provided by an extension must be placed here for auto-inclusion.
Any localization dictionaries to be provided by an extension must be placed here for auto-inclusion.
Like the assets folder, the lib folder is not actually used for auto-inclusion but is conventionally used to store custom library files used by the extension.
Any text formatters to be provided by an extension must be placed here for auto-inclusion.
The extension driver, used to initiate, enable, uninstall, and upgrade an extension and to subscribe to delegates. This file is required.
license or licence
A text file detailing the license(s) used by the extension.
README or README.markdown
The extension’s README file. Conventionally contains basic information (extension name, version, and release date), developer information (name, email, and website) and installation and usage notes.
The Big Picture
The extension file structure is an important part of Symphony’s Extension API (forthcoming).