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
Previous revision
Next revision Both sides next revision
documentation:create_first_plugin [2015/09/03 03:58]
mooeditor [What is boot setting?]
documentation:create_first_plugin [2015/09/03 04:01]
mooeditor [Create an element]
Line 766: Line 766:
 </​file>​ </​file>​
  
-> New in version 2.2.1> +> New in version 2.2.1> You don't have to use $this→requestAction() method to get the need variables anymore e.g: <font 10.0ptline-height:​ 13.0pt;/​arial;;#​000000;;#​ffffff><?​php $notes = $this→requestAction(array('​plugin'​ ⇒ '​Note',​ '​controller'​ ⇒ '​notes',​ '​action'​ ⇒ '​myNotes'​),​ array('​uri'​ ⇒ $this→here));?></​font>​Instead, create a file in //app/​Plugin/​{plugin_name}/​Controller/​Widgets/​{your_element_name}Widget.php//, for <font 10.0ptline-height:​ 13.0pt;​font-family:​ Arial , Helvetica , FreeSans , sans-serif;/​Arial , Helvetica , FreeSans , sans-serif;;#​000000;;#​ffffff>​example:</​font>​ <font 10.0ptline-height:​ 13.0pt;​font-family:​ Arial , Helvetica , FreeSans , sans-serif;/​Arial , Helvetica , FreeSans , sans-serif;;#​000000;;#​ffffff>​//app/​Plugin/​Note/​Controller/​Widgets/​myNotesWidget.php//</​font>​ with the content like the below code:
- +
-You don't have to use $this→requestAction() method to get the need variables anymore +
- +
-e.g: <font 10.0ptline-height:​ 13.0pt;/​arial;;#​000000;;#​ffffff><?​php $notes = $this→requestAction(array('​plugin'​ ⇒ '​Note',​ '​controller'​ ⇒ '​notes',​ '​action'​ ⇒ '​myNotes'​),​ array('​uri'​ ⇒ $this→here));?></​font>​ +
- +
-Instead, create a file in app/​Plugin/​{plugin_name}/​Controller/​Widgets/​{your_element_name}Widget.php,​ for <font 10.0ptline-height:​ 13.0pt;​font-family:​ Arial , Helvetica , FreeSans , sans-serif;/​Arial , Helvetica , FreeSans , sans-serif;;#​000000;;#​ffffff>​example:</​font>​ <font 10.0ptline-height:​ 13.0pt;​font-family:​ Arial , Helvetica , FreeSans , sans-serif;/​Arial , Helvetica , FreeSans , sans-serif;;#​000000;;#​ffffff>​app/​Plugin/​Note/​Controller/​Widgets/​myNotesWidget.php</​font>​ +
- +
-with the content like the below code: +
 <​code>​ <​code>​
 /* **myNotesWidget.ctp** ​ */ /* **myNotesWidget.ctp** ​ */
documentation/create_first_plugin.txt · Last modified: 2015/09/03 00:08 (external edit)