{"id":4837,"date":"2013-05-02T12:14:12","date_gmt":"2013-05-02T03:14:12","guid":{"rendered":"http:\/\/www.moonmile.net\/blog\/?p=4837"},"modified":"2013-05-02T12:14:55","modified_gmt":"2013-05-02T03:14:55","slug":"cakephp-%e3%82%b7%e3%83%b3%e3%83%97%e3%83%ab%e3%81%aa%e8%aa%8d%e8%a8%bc%e3%82%92%e5%ae%9f%e8%a3%85%e3%81%99%e3%82%8b%ef%bc%88%e6%ba%96%e5%82%99%ef%bc%89-3","status":"publish","type":"post","link":"http:\/\/www.moonmile.net\/blog\/archives\/4837","title":{"rendered":"[CakePHP] \u30b7\u30f3\u30d7\u30eb\u306a\u8a8d\u8a3c\u3092\u5b9f\u88c5\u3059\u308b\uff08\u6e96\u5099\uff09"},"content":{"rendered":"<p>\n\u30b7\u30f3\u30d7\u30eb\u306a\u8a8d\u8a3c\u3068\u627f\u8a8d\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 ? CakePHP Cookbook v2.x documentation<br \/>\n<a href=\"http:\/\/book.cakephp.org\/2.0\/ja\/tutorials-and-examples\/blog-auth-example\/auth.html\">http:\/\/book.cakephp.org\/2.0\/ja\/tutorials-and-examples\/blog-auth-example\/auth.html<\/a>\n<\/p>\n<p>\n\u3092\u5229\u7528\u3057\u3066\u3001\u30d5\u30a9\u30fc\u30e0\u8a8d\u8a3c\uff08\u666e\u901a\u306e\u30e6\u30fc\u30b6\u30fc\u540d\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4f7f\u3063\u305f\u30ed\u30b0\u30a4\u30f3\uff09\u3092\u5b9f\u88c5\u3059\u308b\u3002\n<\/p>\n<p>\u3068\u3044\u3046\u304b\u3001\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u307e\u307e\u3067\u52d5\u304b\u3057\u3066\u307f\u308b\u3068\u3044\u3046\u30c6\u30b9\u30c8\u3002\n<\/p>\n<ol>\n<li>\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u308b\u3002<\/li>\n<li>cake bake \u3057\u3066\u3001CRUD \u3092\u4f5c\u308b\u3002<\/li>\n<li>\u30ed\u30b0\u30a4\u30f3\u8a8d\u8a3c\u90e8\u5206\u3092\u4f5c\u308b\u3002<\/li>\n<li>\u30ed\u30fc\u30eb\u3068\u30e6\u30fc\u30b6\u30fc\u3067\u30a2\u30af\u30bb\u30b9\u3092\u5236\u5fa1\u3059\u308b\u3002<\/li>\n<\/ol>\n<p>\n\u306e\u6d41\u308c\u306b\u306a\u308b\u3002\n<\/p>\n<p>\n\u25a0\u5fc5\u8981\u306a\u30c6\u30fc\u30d6\u30eb\n<\/p>\n<p>\u30c6\u30b9\u30c8\u3059\u308b\u305f\u3081\u306e\u6700\u4f4e\u9650\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u7528\u610f\u3059\u308b\u3002\n<\/p>\n<p>\n\u30d6\u30ed\u30b0\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb ? CakePHP Cookbook v2.x documentation<br \/>\n<a href=\"http:\/\/book.cakephp.org\/2.0\/ja\/tutorials-and-examples\/blog\/blog.html\">http:\/\/book.cakephp.org\/2.0\/ja\/tutorials-and-examples\/blog\/blog.html<\/a>\n<\/p>\n<p>\n\u25a1posts \u30c6\u30fc\u30d6\u30eb<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\n\/* \u307e\u305a\u3001posts\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059: *\/\nCREATE TABLE posts (\n    id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n    title VARCHAR(50),\n    body TEXT,\n    created DATETIME DEFAULT NULL,\n    modified DATETIME DEFAULT NULL\n);\n\/* \u305d\u308c\u304b\u3089\u3001\u30c6\u30b9\u30c8\u7528\u306b\u8a18\u4e8b\u3092\u3044\u304f\u3064\u304b\u5165\u308c\u3066\u304a\u304d\u307e\u3059: *\/\nINSERT INTO posts (title,body,created)\n    VALUES (&#039;\u30bf\u30a4\u30c8\u30eb&#039;, &#039;\u3053\u308c\u306f\u3001\u8a18\u4e8b\u306e\u672c\u6587\u3067\u3059\u3002&#039;, NOW());\nINSERT INTO posts (title,body,created)\n    VALUES (&#039;\u307e\u305f\u30bf\u30a4\u30c8\u30eb&#039;, &#039;\u305d\u3053\u306b\u672c\u6587\u304c\u7d9a\u304d\u307e\u3059\u3002&#039;, NOW());\nINSERT INTO posts (title,body,created)\n    VALUES (&#039;\u30bf\u30a4\u30c8\u30eb\u306e\u9006\u8972&#039;, &#039;\u3053\u308a\u3083\u672c\u5f53\u306b\u308f\u304f\u308f\u304f\u3059\u308b\uff01\u3046\u305d\u3002&#039;, NOW());\n<\/pre>\n<p>\n\u25a1users \u30c6\u30fc\u30d6\u30eb<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\nCREATE TABLE users (\n    id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,\n    username VARCHAR(50),\n    password VARCHAR(50),\n    role VARCHAR(20),\n    created DATETIME DEFAULT NULL,\n    modified DATETIME DEFAULT NULL\n);\n<\/pre>\n<p>\n\u203b\u898f\u7d04\u306b\u3057\u305f\u304c\u3063\u3066\u3001\u8907\u6570\u5f62\u300cposts\u300d\u3068\u300cusers\u300d\u3067\u7528\u610f\u3059\u308b\u3068\u3001$useTable \u3057\u306a\u304f\u3066\u6e08\u3080&#8230;\u304c\u3001\u65e2\u5b58\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u4f7f\u3063\u3066\u3082\u53ef\u80fd\u3002\n<\/p>\n<p>\u203b\u5217\u540d\u3092 created, modified \u3068\u3057\u3066\u304a\u304f\u3068\u3001\u81ea\u52d5\u3067\u4f5c\u6210\u65e5\u6642\u3001\u66f4\u65b0\u65e5\u6642\u304c\u5165\u308b\u3002\u624b\u4f5c\u696d\u3067\u3084\u308b\u5834\u5408\u306f\u5225\u9014\u8abf\u67fb\u3002\n<\/p>\n<p>\n\u25a0Config\/database.php \u3092\u66f8\u304d\u63db\u3048\u308b\n<\/p>\n<p>\ncake bake \u304c\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u63a5\u7d9a\u3067\u304d\u308b\u3088\u3046\u306b detabase.php \u3092\u66f8\u304d\u63db\u3048\u3066\u304a\u304f\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\nclass DATABASE_CONFIG {\n\tpublic $default = array(\n\t\t&#039;datasource&#039; =&gt; &#039;Database\/Mysql&#039;,\n\t\t&#039;persistent&#039; =&gt; false,\n\t\t&#039;host&#039; =&gt; &#039;localhost&#039;,\n\t\t&#039;login&#039; =&gt; &#039;user&#039;,\n\t\t&#039;password&#039; =&gt; &#039;password&#039;,\n\t\t&#039;database&#039; =&gt; &#039;test_database_name&#039;,\n\t\t&#039;prefix&#039; =&gt; &#039;&#039;,\n\t\t&#039;encoding&#039; =&gt; &#039;utf8&#039;,\n\t);\n}\n<\/pre>\n<p>\n\u25a0cake bake all \u3067 MVC \u3092\u4f5c\u6210\u3059\u308b\n<\/p>\n<p>\nConsolecake bake all \u3067 Post \u3068 User \u306e MVC \u3092\u4f5c\u6210\u3059\u308b\u3002\n<\/p>\n<p><a href='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_01org2.jpg'><img border='0' src='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_01thum2.jpg'\/><\/a><\/p>\n<p>\n\u203b\u9762\u5012\u304c\u306a\u3051\u308c\u3070\u3001phpunit \u306e\u3072\u306a\u5f62\u3082\u4f5c\u6210\u3057\u307e\u3048\u3070ok\u3002\n<\/p>\n<p>\n\u25a0IE \u3067\u78ba\u8a8d\n<\/p>\n<p><a href=\"http:\/\/localhost:81\/cakeu\/Posts\">http:\/\/localhost:81\/cakeu\/Posts<\/a><br \/>\n<a href=\"http:\/\/localhost:81\/cakeu\/Users\">http:\/\/localhost:81\/cakeu\/Users<\/a><\/p>\n<p>\n\u306b\u30a2\u30af\u30bb\u30b9\u3092\u3057\u3066\u78ba\u8a8d\uff08\u30d5\u30a9\u30eb\u30c0\u540d\u3068\u30dd\u30fc\u30c8\u306f\u9069\u5b9c\u5909\u66f4\uff09\n<\/p>\n<p><a href='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_02org2.jpg'><img border='0' src='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_02thum2.jpg'\/><\/a><br \/>\n<a href='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_03org4.jpg'><img border='0' src='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_03thum4.jpg'\/><\/a><\/p>\n<p>\n\u3053\u306e\u72b6\u614b\u3067\u3001\u81ea\u7531\u306b Post \u3068 User \u304c\u7de8\u96c6\u3067\u304d\u308b\u72b6\u614b\u306b\u306a\u308b\u3002\n<\/p>\n<p>\n\u25a0\u3067\u304d\u3042\u304c\u3063\u305f MVC\n<\/p>\n<p>\ncake bake all \u3059\u308b\u3068\u540c\u3058\u3082\u306e\u304c\u3067\u304d\u308b\u3051\u3069\u3001\u3042\u3068\u304b\u3089\u53c2\u7167\u3067\u304d\u308b\u306e\u81ea\u52d5\u751f\u6210\u3055\u308c\u308b MVC \u30d5\u30a1\u30a4\u30eb\u3092\u8cbc\u308a\u4ed8\u3051\u3066\u304a\u304d\u307e\u3059\u3002\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u898b\u308b\u3068\u3001$this-&gt;request-&gt;is(&#8216;post&#8217;) \u306a REST \u306e\u90e8\u5206\u3068\u304b\u3001$this-&gt;Session-&gt;setFlash \u306a\u30bb\u30c3\u30b7\u30e7\u30f3\u90e8\u5206\u3068\u304b\u304c\u751f\u6210\u3055\u308c\u3066\u3044\u3066\u3001\u5fa1\u5f71\u4e0a\u3084\u3084\u3053\u3057\u304f\u306a\u3063\u3066\u3044\u308b\u3051\u3069\u3001\u30de\u30b9\u30bf\u30fc\u30c6\u30fc\u30d6\u30eb\u306e\u7de8\u96c6\u306a\u3093\u304b\u306f\u3053\u308c\u3067\u5341\u5206\u306a\u306e\u3067\u3001\u305d\u306e\u307e\u307e\u6d3b\u7528\u3057\u3066\u3082\u3088\u3044\u3068\u601d\u3046\u3002\n<\/p>\n<p>\n\u25a1Model\/Post.php<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\nApp::uses(&#039;AppModel&#039;, &#039;Model&#039;);\n\/**\n * Post Model\n *\n *\/\nclass Post extends AppModel {\n\n}\n&amp;#91;\/code&amp;#93;\n&lt;p&gt;\n\u203b\u30ea\u30f3\u30af\u3068\u304b\u3057\u3066\u306a\u3044\u306e\u3067\u7a7a\u3063\u307d\n&lt;\/p&gt;\n&lt;p&gt;\n\u25a1Controller\/PostController.php\n&#x5B;code lang=&quot;php&quot;]\n&lt;?php\nApp::uses(&#039;AppController&#039;, &#039;Controller&#039;);\n\/**\n * Posts Controller\n *\n * @property Post $Post\n *\/\nclass PostsController extends AppController {\n\n\/**\n * index method\n *\n * @return void\n *\/\n\tpublic function index() {\n\t\t$this-&gt;Post-&gt;recursive = 0;\n\t\t$this-&gt;set(&#039;posts&#039;, $this-&gt;paginate());\n\t}\n\n\/**\n * view method\n *\n * @throws NotFoundException\n * @param string $id\n * @return void\n *\/\n\tpublic function view($id = null) {\n\t\tif (!$this-&gt;Post-&gt;exists($id)) {\n\t\t\tthrow new NotFoundException(__(&#039;Invalid post&#039;));\n\t\t}\n\t\t$options = array(&#039;conditions&#039; =&gt; array(&#039;Post.&#039; . $this-&gt;Post-&gt;primaryKey =&gt; $id));\n\t\t$this-&gt;set(&#039;post&#039;, $this-&gt;Post-&gt;find(&#039;first&#039;, $options));\n\t}\n\n\/**\n * add method\n *\n * @return void\n *\/\n\tpublic function add() {\n\t\tif ($this-&gt;request-&gt;is(&#039;post&#039;)) {\n\t\t\t$this-&gt;Post-&gt;create();\n\t\t\tif ($this-&gt;Post-&gt;save($this-&gt;request-&gt;data)) {\n\t\t\t\t$this-&gt;Session-&gt;setFlash(__(&#039;The post has been saved&#039;));\n\t\t\t\t$this-&gt;redirect(array(&#039;action&#039; =&gt; &#039;index&#039;));\n\t\t\t} else {\n\t\t\t\t$this-&gt;Session-&gt;setFlash(__(&#039;The post could not be saved. Please, try again.&#039;));\n\t\t\t}\n\t\t}\n\t\t$users = $this-&gt;Post-&gt;User-&gt;find(&#039;list&#039;);\n\t\t$this-&gt;set(compact(&#039;users&#039;));\n\t}\n\n\/**\n * edit method\n *\n * @throws NotFoundException\n * @param string $id\n * @return void\n *\/\n\tpublic function edit($id = null) {\n\t\tif (!$this-&gt;Post-&gt;exists($id)) {\n\t\t\tthrow new NotFoundException(__(&#039;Invalid post&#039;));\n\t\t}\n\t\tif ($this-&gt;request-&gt;is(&#039;post&#039;) || $this-&gt;request-&gt;is(&#039;put&#039;)) {\n\t\t\tif ($this-&gt;Post-&gt;save($this-&gt;request-&gt;data)) {\n\t\t\t\t$this-&gt;Session-&gt;setFlash(__(&#039;The post has been saved&#039;));\n\t\t\t\t$this-&gt;redirect(array(&#039;action&#039; =&gt; &#039;index&#039;));\n\t\t\t} else {\n\t\t\t\t$this-&gt;Session-&gt;setFlash(__(&#039;The post could not be saved. Please, try again.&#039;));\n\t\t\t}\n\t\t} else {\n\t\t\t$options = array(&#039;conditions&#039; =&gt; array(&#039;Post.&#039; . $this-&gt;Post-&gt;primaryKey =&gt; $id));\n\t\t\t$this-&gt;request-&gt;data = $this-&gt;Post-&gt;find(&#039;first&#039;, $options);\n\t\t}\n\t\t$users = $this-&gt;Post-&gt;User-&gt;find(&#039;list&#039;);\n\t\t$this-&gt;set(compact(&#039;users&#039;));\n\t}\n\n\/**\n * delete method\n *\n * @throws NotFoundException\n * @param string $id\n * @return void\n *\/\n\tpublic function delete($id = null) {\n\t\t$this-&gt;Post-&gt;id = $id;\n\t\tif (!$this-&gt;Post-&gt;exists()) {\n\t\t\tthrow new NotFoundException(__(&#039;Invalid post&#039;));\n\t\t}\n\t\t$this-&gt;request-&gt;onlyAllow(&#039;post&#039;, &#039;delete&#039;);\n\t\tif ($this-&gt;Post-&gt;delete()) {\n\t\t\t$this-&gt;Session-&gt;setFlash(__(&#039;Post deleted&#039;));\n\t\t\t$this-&gt;redirect(array(&#039;action&#039; =&gt; &#039;index&#039;));\n\t\t}\n\t\t$this-&gt;Session-&gt;setFlash(__(&#039;Post was not deleted&#039;));\n\t\t$this-&gt;redirect(array(&#039;action&#039; =&gt; &#039;index&#039;));\n\t}\n}\n<\/pre>\n<p>\n\u25a1Model\/User.php<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\nApp::uses(&#039;AppModel&#039;, &#039;Model&#039;);\n\/**\n * User Model\n *\n *\/\nclass User extends AppModel {\n\n}\n&amp;#91;\/code&amp;#93;\n&lt;p&gt;\n\u203bPost \u3068\u540c\u3058\u3088\u3046\u306b\u30ea\u30f3\u30af\u3068\u304b\u3057\u3066\u306a\u3044\u306e\u3067\u7a7a\u3063\u307d\n&lt;\/p&gt;\n\u203b\u5916\u90e8\u30ad\u30fc\u3092\u4f7f\u3046\u3068\u3001Post \u3068 User \u304c\u30ea\u30f3\u30af\u3059\u308b\u3088\u3046\u306b\u306a\u308b\n&lt;\/p&gt;\n&lt;p&gt;\n\u25a1Controller\/UserController.php\n&#x5B;code lang=&quot;php&quot;]\n&lt;?php\nApp::uses(&#039;AppController&#039;, &#039;Controller&#039;);\n\/**\n * Users Controller\n *\n * @property User $User\n *\/\nclass UsersController extends AppController {\n\n\/**\n * index method\n *\n * @return void\n *\/\n\tpublic function index() {\n\t\t$this-&gt;User-&gt;recursive = 0;\n\t\t$this-&gt;set(&#039;users&#039;, $this-&gt;paginate());\n\t}\n\n\/**\n * view method\n *\n * @throws NotFoundException\n * @param string $id\n * @return void\n *\/\n\tpublic function view($id = null) {\n\t\tif (!$this-&gt;User-&gt;exists($id)) {\n\t\t\tthrow new NotFoundException(__(&#039;Invalid user&#039;));\n\t\t}\n\t\t$options = array(&#039;conditions&#039; =&gt; array(&#039;User.&#039; . $this-&gt;User-&gt;primaryKey =&gt; $id));\n\t\t$this-&gt;set(&#039;user&#039;, $this-&gt;User-&gt;find(&#039;first&#039;, $options));\n\t}\n\n\/**\n * add method\n *\n * @return void\n *\/\n\tpublic function add() {\n\t\tif ($this-&gt;request-&gt;is(&#039;post&#039;)) {\n\t\t\t$this-&gt;User-&gt;create();\n\t\t\tif ($this-&gt;User-&gt;save($this-&gt;request-&gt;data)) {\n\t\t\t\t$this-&gt;Session-&gt;setFlash(__(&#039;The user has been saved&#039;));\n\t\t\t\t$this-&gt;redirect(array(&#039;action&#039; =&gt; &#039;index&#039;));\n\t\t\t} else {\n\t\t\t\t$this-&gt;Session-&gt;setFlash(__(&#039;The user could not be saved. Please, try again.&#039;));\n\t\t\t}\n\t\t}\n\t}\n\n\/**\n * edit method\n *\n * @throws NotFoundException\n * @param string $id\n * @return void\n *\/\n\tpublic function edit($id = null) {\n\t\tif (!$this-&gt;User-&gt;exists($id)) {\n\t\t\tthrow new NotFoundException(__(&#039;Invalid user&#039;));\n\t\t}\n\t\tif ($this-&gt;request-&gt;is(&#039;post&#039;) || $this-&gt;request-&gt;is(&#039;put&#039;)) {\n\t\t\tif ($this-&gt;User-&gt;save($this-&gt;request-&gt;data)) {\n\t\t\t\t$this-&gt;Session-&gt;setFlash(__(&#039;The user has been saved&#039;));\n\t\t\t\t$this-&gt;redirect(array(&#039;action&#039; =&gt; &#039;index&#039;));\n\t\t\t} else {\n\t\t\t\t$this-&gt;Session-&gt;setFlash(__(&#039;The user could not be saved. Please, try again.&#039;));\n\t\t\t}\n\t\t} else {\n\t\t\t$options = array(&#039;conditions&#039; =&gt; array(&#039;User.&#039; . $this-&gt;User-&gt;primaryKey =&gt; $id));\n\t\t\t$this-&gt;request-&gt;data = $this-&gt;User-&gt;find(&#039;first&#039;, $options);\n\t\t}\n\t}\n\n\/**\n * delete method\n *\n * @throws NotFoundException\n * @param string $id\n * @return void\n *\/\n\tpublic function delete($id = null) {\n\t\t$this-&gt;User-&gt;id = $id;\n\t\tif (!$this-&gt;User-&gt;exists()) {\n\t\t\tthrow new NotFoundException(__(&#039;Invalid user&#039;));\n\t\t}\n\t\t$this-&gt;request-&gt;onlyAllow(&#039;post&#039;, &#039;delete&#039;);\n\t\tif ($this-&gt;User-&gt;delete()) {\n\t\t\t$this-&gt;Session-&gt;setFlash(__(&#039;User deleted&#039;));\n\t\t\t$this-&gt;redirect(array(&#039;action&#039; =&gt; &#039;index&#039;));\n\t\t}\n\t\t$this-&gt;Session-&gt;setFlash(__(&#039;User was not deleted&#039;));\n\t\t$this-&gt;redirect(array(&#039;action&#039; =&gt; &#039;index&#039;));\n\t}\n}\n<\/pre>\n<p>\n\u4ee5\u4e0b\u306f\u3001View\n<\/p>\n<p>\n\u25a1View\/Posts\/index.ctp<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;div class=&quot;posts index&quot;&gt;\n\t&lt;h2&gt;&lt;?php echo __(&#039;Posts&#039;); ?&gt;&lt;\/h2&gt;\n\t&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;\n\t&lt;tr&gt;\n\t\t\t&lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort(&#039;id&#039;); ?&gt;&lt;\/th&gt;\n\t\t\t&lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort(&#039;title&#039;); ?&gt;&lt;\/th&gt;\n\t\t\t&lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort(&#039;body&#039;); ?&gt;&lt;\/th&gt;\n\t\t\t&lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort(&#039;created&#039;); ?&gt;&lt;\/th&gt;\n\t\t\t&lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort(&#039;modified&#039;); ?&gt;&lt;\/th&gt;\n\t\t\t&lt;th class=&quot;actions&quot;&gt;&lt;?php echo __(&#039;Actions&#039;); ?&gt;&lt;\/th&gt;\n\t&lt;\/tr&gt;\n\t&lt;?php foreach ($posts as $post): ?&gt;\n\t&lt;tr&gt;\n\t\t&lt;td&gt;&lt;?php echo h($post&amp;#91;&#039;Post&#039;&amp;#93;&amp;#91;&#039;id&#039;&amp;#93;); ?&gt;&amp;nbsp;&lt;\/td&gt;\n\t\t&lt;td&gt;&lt;?php echo h($post&amp;#91;&#039;Post&#039;&amp;#93;&amp;#91;&#039;title&#039;&amp;#93;); ?&gt;&amp;nbsp;&lt;\/td&gt;\n\t\t&lt;td&gt;&lt;?php echo h($post&amp;#91;&#039;Post&#039;&amp;#93;&amp;#91;&#039;body&#039;&amp;#93;); ?&gt;&amp;nbsp;&lt;\/td&gt;\n\t\t&lt;td&gt;&lt;?php echo h($post&amp;#91;&#039;Post&#039;&amp;#93;&amp;#91;&#039;created&#039;&amp;#93;); ?&gt;&amp;nbsp;&lt;\/td&gt;\n\t\t&lt;td&gt;&lt;?php echo h($post&amp;#91;&#039;Post&#039;&amp;#93;&amp;#91;&#039;modified&#039;&amp;#93;); ?&gt;&amp;nbsp;&lt;\/td&gt;\n\t\t&lt;td class=&quot;actions&quot;&gt;\n\t\t\t&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;View&#039;), array(&#039;action&#039; =&gt; &#039;view&#039;, $post&#x5B;&#039;Post&#039;]&#x5B;&#039;id&#039;])); ?&gt;\n\t\t\t&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;Edit&#039;), array(&#039;action&#039; =&gt; &#039;edit&#039;, $post&#x5B;&#039;Post&#039;]&#x5B;&#039;id&#039;])); ?&gt;\n\t\t\t&lt;?php echo $this-&gt;Form-&gt;postLink(__(&#039;Delete&#039;), array(&#039;action&#039; =&gt; &#039;delete&#039;, $post&#x5B;&#039;Post&#039;]&#x5B;&#039;id&#039;]), null, __(&#039;Are you sure you want to delete # %s?&#039;, $post&#x5B;&#039;Post&#039;]&#x5B;&#039;id&#039;])); ?&gt;\n\t\t&lt;\/td&gt;\n\t&lt;\/tr&gt;\n&lt;?php endforeach; ?&gt;\n\t&lt;\/table&gt;\n\t&lt;p&gt;\n\t&lt;?php\n\techo $this-&gt;Paginator-&gt;counter(array(\n\t&#039;format&#039; =&gt; __(&#039;Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}&#039;)\n\t));\n\t?&gt;\t&lt;\/p&gt;\n\t&lt;div class=&quot;paging&quot;&gt;\n\t&lt;?php\n\t\techo $this-&gt;Paginator-&gt;prev(&#039;&lt; &#039; . __(&#039;previous&#039;), array(), null, array(&#039;class&#039; =&gt; &#039;prev disabled&#039;));\n\t\techo $this-&gt;Paginator-&gt;numbers(array(&#039;separator&#039; =&gt; &#039;&#039;));\n\t\techo $this-&gt;Paginator-&gt;next(__(&#039;next&#039;) . &#039; &gt;&#039;, array(), null, array(&#039;class&#039; =&gt; &#039;next disabled&#039;));\n\t?&gt;\n\t&lt;\/div&gt;\n&lt;\/div&gt;\n&lt;div class=&quot;actions&quot;&gt;\n\t&lt;h3&gt;&lt;?php echo __(&#039;Actions&#039;); ?&gt;&lt;\/h3&gt;\n\t&lt;ul&gt;\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;New Post&#039;), array(&#039;action&#039; =&gt; &#039;add&#039;)); ?&gt;&lt;\/li&gt;\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;List Users&#039;), array(&#039;controller&#039; =&gt; &#039;users&#039;, &#039;action&#039; =&gt; &#039;index&#039;)); ?&gt; &lt;\/li&gt;\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;New User&#039;), array(&#039;controller&#039; =&gt; &#039;users&#039;, &#039;action&#039; =&gt; &#039;add&#039;)); ?&gt; &lt;\/li&gt;\n\t&lt;\/ul&gt;\n&lt;\/div&gt;\n<\/pre>\n<p><a href='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_05org.jpg'><img border='0' src='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_05thum.jpg'\/><\/a><\/p>\n<p>\n\u25a1View\/Posts\/view.ctp<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;div class=&quot;posts view&quot;&gt;\n&lt;h2&gt;&lt;?php  echo __(&#039;Post&#039;); ?&gt;&lt;\/h2&gt;\n\t&lt;dl&gt;\n\t\t&lt;dt&gt;&lt;?php echo __(&#039;Id&#039;); ?&gt;&lt;\/dt&gt;\n\t\t&lt;dd&gt;\n\t\t\t&lt;?php echo h($post&amp;#91;&#039;Post&#039;&amp;#93;&amp;#91;&#039;id&#039;&amp;#93;); ?&gt;\n\t\t\t&amp;nbsp;\n\t\t&lt;\/dd&gt;\n\t\t&lt;dt&gt;&lt;?php echo __(&#039;Title&#039;); ?&gt;&lt;\/dt&gt;\n\t\t&lt;dd&gt;\n\t\t\t&lt;?php echo h($post&amp;#91;&#039;Post&#039;&amp;#93;&amp;#91;&#039;title&#039;&amp;#93;); ?&gt;\n\t\t\t&amp;nbsp;\n\t\t&lt;\/dd&gt;\n\t\t&lt;dt&gt;&lt;?php echo __(&#039;Body&#039;); ?&gt;&lt;\/dt&gt;\n\t\t&lt;dd&gt;\n\t\t\t&lt;?php echo h($post&amp;#91;&#039;Post&#039;&amp;#93;&amp;#91;&#039;body&#039;&amp;#93;); ?&gt;\n\t\t\t&amp;nbsp;\n\t\t&lt;\/dd&gt;\n\t\t&lt;dt&gt;&lt;?php echo __(&#039;Created&#039;); ?&gt;&lt;\/dt&gt;\n\t\t&lt;dd&gt;\n\t\t\t&lt;?php echo h($post&amp;#91;&#039;Post&#039;&amp;#93;&amp;#91;&#039;created&#039;&amp;#93;); ?&gt;\n\t\t\t&amp;nbsp;\n\t\t&lt;\/dd&gt;\n\t\t&lt;dt&gt;&lt;?php echo __(&#039;Modified&#039;); ?&gt;&lt;\/dt&gt;\n\t\t&lt;dd&gt;\n\t\t\t&lt;?php echo h($post&amp;#91;&#039;Post&#039;&amp;#93;&amp;#91;&#039;modified&#039;&amp;#93;); ?&gt;\n\t\t\t&amp;nbsp;\n\t\t&lt;\/dd&gt;\n\t&lt;\/dl&gt;\n&lt;\/div&gt;\n&lt;div class=&quot;actions&quot;&gt;\n\t&lt;h3&gt;&lt;?php echo __(&#039;Actions&#039;); ?&gt;&lt;\/h3&gt;\n\t&lt;ul&gt;\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;Edit Post&#039;), array(&#039;action&#039; =&gt; &#039;edit&#039;, $post&#x5B;&#039;Post&#039;]&#x5B;&#039;id&#039;])); ?&gt; &lt;\/li&gt;\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Form-&gt;postLink(__(&#039;Delete Post&#039;), array(&#039;action&#039; =&gt; &#039;delete&#039;, $post&#x5B;&#039;Post&#039;]&#x5B;&#039;id&#039;]), null, __(&#039;Are you sure you want to delete # %s?&#039;, $post&#x5B;&#039;Post&#039;]&#x5B;&#039;id&#039;])); ?&gt; &lt;\/li&gt;\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;List Posts&#039;), array(&#039;action&#039; =&gt; &#039;index&#039;)); ?&gt; &lt;\/li&gt;\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;New Post&#039;), array(&#039;action&#039; =&gt; &#039;add&#039;)); ?&gt; &lt;\/li&gt;\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;List Users&#039;), array(&#039;controller&#039; =&gt; &#039;users&#039;, &#039;action&#039; =&gt; &#039;index&#039;)); ?&gt; &lt;\/li&gt;\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;New User&#039;), array(&#039;controller&#039; =&gt; &#039;users&#039;, &#039;action&#039; =&gt; &#039;add&#039;)); ?&gt; &lt;\/li&gt;\n\t&lt;\/ul&gt;\n&lt;\/div&gt;\n<\/pre>\n<p><a href='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_06org.jpg'><img border='0' src='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_06thum.jpg'\/><\/a><\/p>\n<p>\n\u25a1View\/Posts\/add.ctp<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;div class=&quot;posts form&quot;&gt;\n&lt;?php echo $this-&gt;Form-&gt;create(&#039;Post&#039;); ?&gt;\n\t&lt;fieldset&gt;\n\t\t&lt;legend&gt;&lt;?php echo __(&#039;Add Post&#039;); ?&gt;&lt;\/legend&gt;\n\t&lt;?php\n\t\techo $this-&gt;Form-&gt;input(&#039;title&#039;);\n\t\techo $this-&gt;Form-&gt;input(&#039;body&#039;);\n\t?&gt;\n\t&lt;\/fieldset&gt;\n&lt;?php echo $this-&gt;Form-&gt;end(__(&#039;Submit&#039;)); ?&gt;\n&lt;\/div&gt;\n&lt;div class=&quot;actions&quot;&gt;\n\t&lt;h3&gt;&lt;?php echo __(&#039;Actions&#039;); ?&gt;&lt;\/h3&gt;\n\t&lt;ul&gt;\n\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;List Posts&#039;), array(&#039;action&#039; =&gt; &#039;index&#039;)); ?&gt;&lt;\/li&gt;\n\t&lt;\/ul&gt;\n&lt;\/div&gt;\n<\/pre>\n<p><a href='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_07org.jpg'><img border='0' src='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_07thum.jpg'\/><\/a><\/p>\n<p>\n\u25a1View\/Posts\/edit.ctp<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;div class=&quot;posts form&quot;&gt;\n&lt;?php echo $this-&gt;Form-&gt;create(&#039;Post&#039;); ?&gt;\n\t&lt;fieldset&gt;\n\t\t&lt;legend&gt;&lt;?php echo __(&#039;Edit Post&#039;); ?&gt;&lt;\/legend&gt;\n\t&lt;?php\n\t\techo $this-&gt;Form-&gt;input(&#039;id&#039;);\n\t\techo $this-&gt;Form-&gt;input(&#039;title&#039;);\n\t\techo $this-&gt;Form-&gt;input(&#039;body&#039;);\n\t?&gt;\n\t&lt;\/fieldset&gt;\n&lt;?php echo $this-&gt;Form-&gt;end(__(&#039;Submit&#039;)); ?&gt;\n&lt;\/div&gt;\n&lt;div class=&quot;actions&quot;&gt;\n\t&lt;h3&gt;&lt;?php echo __(&#039;Actions&#039;); ?&gt;&lt;\/h3&gt;\n\t&lt;ul&gt;\n\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Form-&gt;postLink(__(&#039;Delete&#039;), array(&#039;action&#039; =&gt; &#039;delete&#039;, $this-&gt;Form-&gt;value(&#039;Post.id&#039;)), null, __(&#039;Are you sure you want to delete # %s?&#039;, $this-&gt;Form-&gt;value(&#039;Post.id&#039;))); ?&gt;&lt;\/li&gt;\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;List Posts&#039;), array(&#039;action&#039; =&gt; &#039;index&#039;)); ?&gt;&lt;\/li&gt;\n\t&lt;\/ul&gt;\n&lt;\/div&gt;\n<\/pre>\n<p><a href='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_08org.jpg'><img border='0' src='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_08thum.jpg'\/><\/a><\/p>\n<p>\n\u25a1View\/Users\/index.ctp<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;div class=&quot;users index&quot;&gt;\n\t&lt;h2&gt;&lt;?php echo __(&#039;Users&#039;); ?&gt;&lt;\/h2&gt;\n\t&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;\n\t&lt;tr&gt;\n\t\t\t&lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort(&#039;id&#039;); ?&gt;&lt;\/th&gt;\n\t\t\t&lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort(&#039;username&#039;); ?&gt;&lt;\/th&gt;\n\t\t\t&lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort(&#039;password&#039;); ?&gt;&lt;\/th&gt;\n\t\t\t&lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort(&#039;role&#039;); ?&gt;&lt;\/th&gt;\n\t\t\t&lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort(&#039;created&#039;); ?&gt;&lt;\/th&gt;\n\t\t\t&lt;th&gt;&lt;?php echo $this-&gt;Paginator-&gt;sort(&#039;modified&#039;); ?&gt;&lt;\/th&gt;\n\t\t\t&lt;th class=&quot;actions&quot;&gt;&lt;?php echo __(&#039;Actions&#039;); ?&gt;&lt;\/th&gt;\n\t&lt;\/tr&gt;\n\t&lt;?php foreach ($users as $user): ?&gt;\n\t&lt;tr&gt;\n\t\t&lt;td&gt;&lt;?php echo h($user&amp;#91;&#039;User&#039;&amp;#93;&amp;#91;&#039;id&#039;&amp;#93;); ?&gt;&amp;nbsp;&lt;\/td&gt;\n\t\t&lt;td&gt;&lt;?php echo h($user&amp;#91;&#039;User&#039;&amp;#93;&amp;#91;&#039;username&#039;&amp;#93;); ?&gt;&amp;nbsp;&lt;\/td&gt;\n\t\t&lt;td&gt;&lt;?php echo h($user&amp;#91;&#039;User&#039;&amp;#93;&amp;#91;&#039;password&#039;&amp;#93;); ?&gt;&amp;nbsp;&lt;\/td&gt;\n\t\t&lt;td&gt;&lt;?php echo h($user&amp;#91;&#039;User&#039;&amp;#93;&amp;#91;&#039;role&#039;&amp;#93;); ?&gt;&amp;nbsp;&lt;\/td&gt;\n\t\t&lt;td&gt;&lt;?php echo h($user&amp;#91;&#039;User&#039;&amp;#93;&amp;#91;&#039;created&#039;&amp;#93;); ?&gt;&amp;nbsp;&lt;\/td&gt;\n\t\t&lt;td&gt;&lt;?php echo h($user&amp;#91;&#039;User&#039;&amp;#93;&amp;#91;&#039;modified&#039;&amp;#93;); ?&gt;&amp;nbsp;&lt;\/td&gt;\n\t\t&lt;td class=&quot;actions&quot;&gt;\n\t\t\t&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;View&#039;), array(&#039;action&#039; =&gt; &#039;view&#039;, $user&#x5B;&#039;User&#039;]&#x5B;&#039;id&#039;])); ?&gt;\n\t\t\t&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;Edit&#039;), array(&#039;action&#039; =&gt; &#039;edit&#039;, $user&#x5B;&#039;User&#039;]&#x5B;&#039;id&#039;])); ?&gt;\n\t\t\t&lt;?php echo $this-&gt;Form-&gt;postLink(__(&#039;Delete&#039;), array(&#039;action&#039; =&gt; &#039;delete&#039;, $user&#x5B;&#039;User&#039;]&#x5B;&#039;id&#039;]), null, __(&#039;Are you sure you want to delete # %s?&#039;, $user&#x5B;&#039;User&#039;]&#x5B;&#039;id&#039;])); ?&gt;\n\t\t&lt;\/td&gt;\n\t&lt;\/tr&gt;\n&lt;?php endforeach; ?&gt;\n\t&lt;\/table&gt;\n\t&lt;p&gt;\n\t&lt;?php\n\techo $this-&gt;Paginator-&gt;counter(array(\n\t&#039;format&#039; =&gt; __(&#039;Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}&#039;)\n\t));\n\t?&gt;\t&lt;\/p&gt;\n\t&lt;div class=&quot;paging&quot;&gt;\n\t&lt;?php\n\t\techo $this-&gt;Paginator-&gt;prev(&#039;&lt; &#039; . __(&#039;previous&#039;), array(), null, array(&#039;class&#039; =&gt; &#039;prev disabled&#039;));\n\t\techo $this-&gt;Paginator-&gt;numbers(array(&#039;separator&#039; =&gt; &#039;&#039;));\n\t\techo $this-&gt;Paginator-&gt;next(__(&#039;next&#039;) . &#039; &gt;&#039;, array(), null, array(&#039;class&#039; =&gt; &#039;next disabled&#039;));\n\t?&gt;\n\t&lt;\/div&gt;\n&lt;\/div&gt;\n&lt;div class=&quot;actions&quot;&gt;\n\t&lt;h3&gt;&lt;?php echo __(&#039;Actions&#039;); ?&gt;&lt;\/h3&gt;\n\t&lt;ul&gt;\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;New User&#039;), array(&#039;action&#039; =&gt; &#039;add&#039;)); ?&gt;&lt;\/li&gt;\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;List Posts&#039;), array(&#039;controller&#039; =&gt; &#039;posts&#039;, &#039;action&#039; =&gt; &#039;index&#039;)); ?&gt; &lt;\/li&gt;\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;New Post&#039;), array(&#039;controller&#039; =&gt; &#039;posts&#039;, &#039;action&#039; =&gt; &#039;add&#039;)); ?&gt; &lt;\/li&gt;\n\t&lt;\/ul&gt;\n&lt;\/div&gt;\n<\/pre>\n<p><a href='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_12org.jpg'><img border='0' src='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_12thum.jpg'\/><\/a><\/p>\n<p>\n\u203b\u4f55\u56de\u304b\u30c6\u30b9\u30c8\u3057\u3066\u3044\u308b\u306e\u3067 ID \u304c 1 \u304b\u3089\u59cb\u307e\u3063\u3066\u306a\u3044\u3002\n<\/p>\n<p>\u203b\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u3001\u305d\u306e\u307e\u307e\u66f8\u304d\u8fbc\u307e\u308c\u3066\u3044\u308b\u3002\u3053\u308c\u306f\u5f8c\u3067\u30cf\u30c3\u30b7\u30e5\u5024\u306b\u3059\u308b\u3002\n<\/p>\n<p>\n\u25a1View\/Users\/view.ctp<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;div class=&quot;posts view&quot;&gt;\n&lt;h2&gt;&lt;?php  echo __(&#039;Post&#039;); ?&gt;&lt;\/h2&gt;\n\t&lt;dl&gt;\n\t\t&lt;dt&gt;&lt;?php echo __(&#039;Id&#039;); ?&gt;&lt;\/dt&gt;\n\t\t&lt;dd&gt;\n\t\t\t&lt;?php echo h($post&amp;#91;&#039;Post&#039;&amp;#93;&amp;#91;&#039;id&#039;&amp;#93;); ?&gt;\n\t\t\t&amp;nbsp;\n\t\t&lt;\/dd&gt;\n\t\t&lt;dt&gt;&lt;?php echo __(&#039;Title&#039;); ?&gt;&lt;\/dt&gt;\n\t\t&lt;dd&gt;\n\t\t\t&lt;?php echo h($post&amp;#91;&#039;Post&#039;&amp;#93;&amp;#91;&#039;title&#039;&amp;#93;); ?&gt;\n\t\t\t&amp;nbsp;\n\t\t&lt;\/dd&gt;\n\t\t&lt;dt&gt;&lt;?php echo __(&#039;Body&#039;); ?&gt;&lt;\/dt&gt;\n\t\t&lt;dd&gt;\n\t\t\t&lt;?php echo h($post&amp;#91;&#039;Post&#039;&amp;#93;&amp;#91;&#039;body&#039;&amp;#93;); ?&gt;\n\t\t\t&amp;nbsp;\n\t\t&lt;\/dd&gt;\n\t\t&lt;dt&gt;&lt;?php echo __(&#039;Created&#039;); ?&gt;&lt;\/dt&gt;\n\t\t&lt;dd&gt;\n\t\t\t&lt;?php echo h($post&amp;#91;&#039;Post&#039;&amp;#93;&amp;#91;&#039;created&#039;&amp;#93;); ?&gt;\n\t\t\t&amp;nbsp;\n\t\t&lt;\/dd&gt;\n\t\t&lt;dt&gt;&lt;?php echo __(&#039;Modified&#039;); ?&gt;&lt;\/dt&gt;\n\t\t&lt;dd&gt;\n\t\t\t&lt;?php echo h($post&amp;#91;&#039;Post&#039;&amp;#93;&amp;#91;&#039;modified&#039;&amp;#93;); ?&gt;\n\t\t\t&amp;nbsp;\n\t\t&lt;\/dd&gt;\n\t&lt;\/dl&gt;\n&lt;\/div&gt;\n&lt;div class=&quot;actions&quot;&gt;\n\t&lt;h3&gt;&lt;?php echo __(&#039;Actions&#039;); ?&gt;&lt;\/h3&gt;\n\t&lt;ul&gt;\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;Edit Post&#039;), array(&#039;action&#039; =&gt; &#039;edit&#039;, $post&#x5B;&#039;Post&#039;]&#x5B;&#039;id&#039;])); ?&gt; &lt;\/li&gt;\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Form-&gt;postLink(__(&#039;Delete Post&#039;), array(&#039;action&#039; =&gt; &#039;delete&#039;, $post&#x5B;&#039;Post&#039;]&#x5B;&#039;id&#039;]), null, __(&#039;Are you sure you want to delete # %s?&#039;, $post&#x5B;&#039;Post&#039;]&#x5B;&#039;id&#039;])); ?&gt; &lt;\/li&gt;\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;List Posts&#039;), array(&#039;action&#039; =&gt; &#039;index&#039;)); ?&gt; &lt;\/li&gt;\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;New Post&#039;), array(&#039;action&#039; =&gt; &#039;add&#039;)); ?&gt; &lt;\/li&gt;\n\t&lt;\/ul&gt;\n&lt;\/div&gt;\n<\/pre>\n<p><a href='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_13org.jpg'><img border='0' src='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_13thum.jpg'\/><\/a><\/p>\n<p>\n\u25a1View\/Users\/add.ctp<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;div class=&quot;posts form&quot;&gt;\n&lt;?php echo $this-&gt;Form-&gt;create(&#039;Post&#039;); ?&gt;\n\t&lt;fieldset&gt;\n\t\t&lt;legend&gt;&lt;?php echo __(&#039;Add Post&#039;); ?&gt;&lt;\/legend&gt;\n\t&lt;?php\n\t\techo $this-&gt;Form-&gt;input(&#039;title&#039;);\n\t\techo $this-&gt;Form-&gt;input(&#039;body&#039;);\n\t?&gt;\n\t&lt;\/fieldset&gt;\n&lt;?php echo $this-&gt;Form-&gt;end(__(&#039;Submit&#039;)); ?&gt;\n&lt;\/div&gt;\n&lt;div class=&quot;actions&quot;&gt;\n\t&lt;h3&gt;&lt;?php echo __(&#039;Actions&#039;); ?&gt;&lt;\/h3&gt;\n\t&lt;ul&gt;\n\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;List Posts&#039;), array(&#039;action&#039; =&gt; &#039;index&#039;)); ?&gt;&lt;\/li&gt;\n\t&lt;\/ul&gt;\n&lt;\/div&gt;\n<\/pre>\n<p><a href='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_14org.jpg'><img border='0' src='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_14thum.jpg'\/><\/a><\/p>\n<p>\n\u25a1View\/Users\/edit.ctp<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;div class=&quot;posts form&quot;&gt;\n&lt;?php echo $this-&gt;Form-&gt;create(&#039;Post&#039;); ?&gt;\n\t&lt;fieldset&gt;\n\t\t&lt;legend&gt;&lt;?php echo __(&#039;Edit Post&#039;); ?&gt;&lt;\/legend&gt;\n\t&lt;?php\n\t\techo $this-&gt;Form-&gt;input(&#039;id&#039;);\n\t\techo $this-&gt;Form-&gt;input(&#039;title&#039;);\n\t\techo $this-&gt;Form-&gt;input(&#039;body&#039;);\n\t?&gt;\n\t&lt;\/fieldset&gt;\n&lt;?php echo $this-&gt;Form-&gt;end(__(&#039;Submit&#039;)); ?&gt;\n&lt;\/div&gt;\n&lt;div class=&quot;actions&quot;&gt;\n\t&lt;h3&gt;&lt;?php echo __(&#039;Actions&#039;); ?&gt;&lt;\/h3&gt;\n\t&lt;ul&gt;\n\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Form-&gt;postLink(__(&#039;Delete&#039;), array(&#039;action&#039; =&gt; &#039;delete&#039;, $this-&gt;Form-&gt;value(&#039;Post.id&#039;)), null, __(&#039;Are you sure you want to delete # %s?&#039;, $this-&gt;Form-&gt;value(&#039;Post.id&#039;))); ?&gt;&lt;\/li&gt;\n\t\t&lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__(&#039;List Posts&#039;), array(&#039;action&#039; =&gt; &#039;index&#039;)); ?&gt;&lt;\/li&gt;\n\t&lt;\/ul&gt;\n&lt;\/div&gt;\n<\/pre>\n<p><a href='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_15org.jpg'><img border='0' src='http:\/\/www.moonmile.net\/blog\/wp-content\/uploads\/2013\/05\/wpid-dworkblogimage20130502_15thum.jpg'\/><\/a><\/p>\n<p>\n\u3053\u306e\u72b6\u614b\u304b\u3089\u3001\n<\/p>\n<p>\n\u8a8d\u8a3c(\u30ed\u30b0\u30a4\u30f3\u3068\u30ed\u30b0\u30a2\u30a6\u30c8)<br \/>\n<a href=\"http:\/\/book.cakephp.org\/2.0\/ja\/tutorials-and-examples\/blog-auth-example\/auth.html#id3\">http:\/\/book.cakephp.org\/2.0\/ja\/tutorials-and-examples\/blog-auth-example\/auth.html#id3<\/a>\n<\/p>\n<p>\n\u3092\u8ffd\u52a0\u3057\u3066\u3044\u304f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30b7\u30f3\u30d7\u30eb\u306a\u8a8d\u8a3c\u3068\u627f\u8a8d\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 ? CakePHP Cookbook v2.x documentation http:\/\/book.cakephp.org\/2.0\/ja\/tutorials-and-example &hellip; <a href=\"http:\/\/www.moonmile.net\/blog\/archives\/4837\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[20],"tags":[],"class_list":["post-4837","post","type-post","status-publish","format-standard","hentry","category-cakephp"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/4837","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/comments?post=4837"}],"version-history":[{"count":1,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/4837\/revisions"}],"predecessor-version":[{"id":4838,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/4837\/revisions\/4838"}],"wp:attachment":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/media?parent=4837"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/categories?post=4837"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/tags?post=4837"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}