{"id":4,"date":"2009-04-14T00:10:45","date_gmt":"2009-04-13T15:10:45","guid":{"rendered":"https:\/\/memo.cute.bz\/cakephp\/?p=4"},"modified":"2009-04-15T23:53:51","modified_gmt":"2009-04-15T14:53:51","slug":"%e7%ae%a1%e7%90%86%e7%94%bb%e9%9d%a2%e3%81%ae%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/memo.cute.bz\/cakephp\/?p=4","title":{"rendered":"\u7ba1\u7406\u753b\u9762\u306e\u8a2d\u5b9a"},"content":{"rendered":"<p>\u7ba1\u7406\u753b\u9762\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a\u3002<\/p>\n<p>\u4ee5\u4e0b\u306eURL\u5f62\u5f0f\u3067\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3002<br \/>\nhttp:\/\/sample.domain.com\/admin\/controller\/action<\/p>\n<p><!--more--><\/p>\n<h3>Admin \u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u8a2d\u5b9a<\/h3>\n<p>Admin \u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u6709\u52b9\u306b\u3059\u308b\u305f\u3081\u306b\u4ee5\u4e0b\u3092\u4fee\u6b63\u3002<\/p>\n<p>\/app\/config\/core.php \u306e\u4ee5\u4e0b\u306e\u884c\u304c\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u6709\u52b9\u306b\u3059\u308b\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nConfigure::write('Routing.admin', 'admin');\r\n<\/pre>\n<p>\u203b\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a admin \u3067\u306f\u306a\u3044\u307b\u3046\u304c\u3044\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u3002<\/p>\n<h3>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9<\/h3>\n<h4>\u30e1\u30bd\u30c3\u30c9\u306e\u547d\u540d\u898f\u5247<\/h4>\n<p>\u30e1\u30bd\u30c3\u30c9\u306e\u8a18\u8ff0\u4f8b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nfunction admin_action() {\r\n    \/\/ \u51e6\u7406\u5185\u5bb9\r\n}\r\n<\/pre>\n<h4>\u30ec\u30a4\u30a2\u30a6\u30c8\u306e\u6307\u5b9a<\/h4>\n<p>params \u30e1\u30f3\u30d0\u914d\u5217\u306b admin \u30ad\u30fc\u304c\u8a2d\u5b9a\u3055\u308c\u308b\u306e\u3067 App \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3001\u307e\u305f\u306f\u3001\u5404\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u306e beforeRender() \u3067\u632f\u308a\u5206\u3051\u308b\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nfunction beforeRender() {\r\n    parent::beforeFilter();\r\n    if (isset($this-&gt;params&#x5B;'admin']) &amp;&amp; true === $this-&gt;params&#x5B;'admin']) {\r\n        $this-&gt;layout = 'admin';\r\n    }\r\n}\r\n<\/pre>\n<h3>\u30d3\u30e5\u30fc<\/h3>\n<p>\u30d3\u30e5\u30fc\u306e\u30d5\u30a1\u30a4\u30eb\u547d\u540d\u898f\u5247\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<p>\/app\/views\/controller\/admin_action.ctp<\/p>\n<h3>Routs<\/h3>\n<p>http:\/\/sample.domain.com\/admin \u3067\u5b9f\u884c\u3059\u308b\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u8a2d\u5b9a\u3059\u308b\u305f\u3081\u306b \/app\/core\/routes.php \u3092\u4fee\u6b63\u3057\u3066 Routs \u3092\u8a2d\u5b9a\u3059\u308b\u3002<\/p>\n<p>\u4f8b \uff1a Users \u30b3\u30f3\u30c8\u30ed\u30fc\u30e9 \u306e admin_index \u30a2\u30af\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3059\u308b\u5834\u5408\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nRouter::connect('\/admin', array('controller' =&gt; 'users', 'action' =&gt; 'index', 'admin' =&gt; true));\r\n<\/pre>\n<p>\u203b\u53c2\u8003<br \/>\n<a href=\"http:\/\/deadlytechnology.com\/web-development-tips\/cakephp-admin-routing-redirect\/\" class=\"note\">CakePHP Admin Routing : Access admin actions with admin routing enabled | Deadly Technology<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7ba1\u7406\u753b\u9762\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a\u3002 \u4ee5\u4e0b\u306eURL\u5f62\u5f0f\u3067\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3002 http:\/\/sample.domain.com\/admin\/controller\/action<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-4","post","type-post","status-publish","format-standard","hentry","category-2"],"_links":{"self":[{"href":"https:\/\/memo.cute.bz\/cakephp\/index.php?rest_route=\/wp\/v2\/posts\/4","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/memo.cute.bz\/cakephp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/memo.cute.bz\/cakephp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/memo.cute.bz\/cakephp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/memo.cute.bz\/cakephp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4"}],"version-history":[{"count":0,"href":"https:\/\/memo.cute.bz\/cakephp\/index.php?rest_route=\/wp\/v2\/posts\/4\/revisions"}],"wp:attachment":[{"href":"https:\/\/memo.cute.bz\/cakephp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/memo.cute.bz\/cakephp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/memo.cute.bz\/cakephp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}