Class: Saruman::Generators::Extension
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Saruman::Generators::Extension
show all
- Includes:
- Base, Thor::Actions
- Defined in:
- lib/saruman/generators/extension.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Base
#app_design_frontend_base_layout_local_xml_path, #app_design_frontend_base_layout_path, #app_design_frontend_base_path, #app_design_frontend_base_template_namespace_path, #app_design_frontend_base_template_path, #author, #block_klass_name, #combined_namespace, #command, #config_has_tag?, #controller?, #controller_block_file_path, #controller_block_path, #controller_front_name, #controller_path, #controllers, #extension_base_path, #extension_config_file_path, #extension_config_path, #extension_current_version, #extension_name_lower, #extension_temp_path, #extension_upgrade_version, #global_config_basepath, #global_config_file_path, #helper?, #helper_path, #insert_tag_at_node, #insert_xml_at_node, #model?, #model_klass_name, #model_path, #models, #name, #name_lower, #namespace, #namespace_lower, #observer?, #observers, #read_extension_config, #resource_model_klass_name, #resource_model_name, #resource_model_path, #setup_base_path, #version, #write_extension_config
Class Method Details
.source_root ⇒ Object
11
12
13
|
# File 'lib/saruman/generators/extension.rb', line 11
def self.source_root
File.dirname(__FILE__) + "/extension/templates"
end
|
Instance Method Details
#copy_extension_config ⇒ Object
19
20
21
|
# File 'lib/saruman/generators/extension.rb', line 19
def copy_extension_config
template("extension_config.xml", "#{extension_config_path}/config.xml")
end
|
#copy_global_config ⇒ Object
15
16
17
|
# File 'lib/saruman/generators/extension.rb', line 15
def copy_global_config
template("module.xml", "#{global_config_basepath}#{arguments[:namespace]}_#{arguments[:name]}.xml")
end
|
#create_helper ⇒ Object
33
34
35
36
37
|
# File 'lib/saruman/generators/extension.rb', line 33
def create_helper
if helper?
template("Helper.php", "#{helper_path}Data.php")
end
end
|
#create_model_directory ⇒ Object
23
24
25
|
# File 'lib/saruman/generators/extension.rb', line 23
def create_model_directory
empty_directory(model_path)
end
|
#create_observers ⇒ Object
27
28
29
30
31
|
# File 'lib/saruman/generators/extension.rb', line 27
def create_observers
if observer?
template("Observer.php", "#{model_path}Observer.php")
end
end
|