Details
-
Type: Sub-task
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 4.12.0-b1
-
Component/s: None
-
Labels:None
Description
Extension files should be generated based on templates. These templates should be formatted such that:
- Optional files can be included/excluded on an individual basis
- Tag replacement can be used to insert a value such as a module class name
- Commented code blocks can be included/excluded
A class should be created ExtensionTemplateParser
With:
/** * string $extension_type The type of extension for which to parse files * array $options A list of options for parsing the template file including: * * - comment_code True to include commented out code examples * - language_code The language code for which to create a language file * - replacements A list of tag names and their replacements * - optional_methods A list method names to include */ __constructor($extension_type, array $options) setExtensionType setOptions setOutputDir parseAndOutput
Commented code blocks will be marked with "////"
Replacement tags will be in the format tagname
Optional methods will be bookended by tags in the format
{method_name}