DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:event:draft_save

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
devel:event:draft_save [2020-09-23 22:48] – [Passed Data] Klap-indevel:event:draft_save [2020-10-27 11:32] (current) – [See also] s-sahara
Line 14: Line 14:
 This is the data you can use and modify in the event. This is also what is saved in serialized form as a draft at the end. This is the data you can use and modify in the event. This is also what is saved in serialized form as a draft at the end.
  
- +<code> 
-The $data field is an array with the keys: +$data = [ 
-  * ''id'' -- 'pageid' +    'id' => 'pageid' 
-  * ''prefix'' -- 'text before the edited section', +    'prefix' => 'text before the edited section', 
-  * ''text'' -- 'text of the edited section', +    'text' => 'text of the edited section', 
-  * ''suffix'' -- 'text after the edited section', +    'suffix' => 'text after the edited section', 
-  * ''date'' -- '1598944648',  unix timestamp of when editing started +    'date' => '1598944648', // unix timestamp of when editing started 
-  * ''client'' -- 'andi',  client identification. user name, ip address or similar +    'client' => 'andi', // client identification. user name, ip address  
-  * ''cname'' -- 'data/cache/...',  cache file where the draft is to be saved +                        // or similar 
-  * ''errors'' -- [ ], array with list of errors that should be shown to the end user +    'cname' => 'data/cache/...', // cache file where the draft is to be saved 
- +    'errors' => [], // list of errors that should be shown to the end user 
 +]; 
 +</code>
  
 ===== See also ===== ===== See also =====
Line 32: Line 33:
   * [[devel:Action Plugins]]   * [[devel:Action Plugins]]
   * [[devel:Events]]   * [[devel:Events]]
-  * [[config:usedraft]]+  * Configuration Setting: [[config:usedraft]]
  
  
devel/event/draft_save.1600894088.txt.gz · Last modified: 2020-09-23 22:48 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki