Following is the process to register/Create service in awesome enterprise:
- nowLocate “Awesome core” which is situated in “Awesome enterprise” wp-admin menu.
- In that Choose – “service” and edit service core.
- Here dc_star service is created, with label DC star, post_type = ‘dc star’.
- while calling, service name plays crucial role, hence be specific while declaring service name.
Create module and template in Service
- After creating service option will get displayed in wp-admin left side bar option | Service – Awesome Enterprises
- click on your created service, you can recognize your service by service label you mentioned while creating it.
- Now create you own module as per your requirement in that service.
- Remember, service is collection of modules which works in generic operation.
- Such as, you just have to pass json, array or parameters to service and it will perform the action as per coded.
- If any condition to be given to input data, make it possible in calling module.
- Do not emboss service to condition it as then it can not be generalize.
- In dc star service, Module is created as dc_star_module with one array parameter.
- Always create main template after creating module i.e best practice in awesome.
- hence calling dc_star_module will be:
- Same as module, templates can be created in service with in the module
- If template is not defined then awesome will execute main template of called module.
- let create add template in dc_star_module
- so while calling add template syntax will change as