User Tools

Site Tools


documentation:create_first_plugin

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
documentation:create_first_plugin [2015/09/03 04:01]
mooeditor [Create an element]
documentation:create_first_plugin [2015/09/03 04:02]
mooeditor [What is boot setting?]
Line 1119: Line 1119:
 Which case do we need? In common, almost plugin settings needn'​t a boot setting, but some still have one such as '​enabled'​ setting which makes us know whether user can access that plugin or not. Why do we need a boot setting? Because when we want to block access, we need to check enable or not in '​routes.php'​ file of plugin; And importantly,​ '​routes.php'​ file is loaded before the system loads unboot settings, so if we don't make '​enabled'​ setting by boot, we can't check it (because that setting doesn'​t exist at that time). Which case do we need? In common, almost plugin settings needn'​t a boot setting, but some still have one such as '​enabled'​ setting which makes us know whether user can access that plugin or not. Why do we need a boot setting? Because when we want to block access, we need to check enable or not in '​routes.php'​ file of plugin; And importantly,​ '​routes.php'​ file is loaded before the system loads unboot settings, so if we don't make '​enabled'​ setting by boot, we can't check it (because that setting doesn'​t exist at that time).
  
-**** New in version 2.2** >** +> New in version 2.2** ** In version 2.2, the "​{plugin}_enabled"​ setting have "​is_boot"​ field is '​1'​ by default when you created a new plugin
- +
-In version 2.2, the "​{plugin}_enabled"​ setting have "​is_boot"​ field is '​1'​ by default when you created a new plugin+
  
 ==== Create boot setting ==== ==== Create boot setting ====
documentation/create_first_plugin.txt · Last modified: 2015/09/03 00:08 (external edit)