<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>programingdiaryのブログ</title>
<link>https://ameblo.jp/programingdiary/</link>
<atom:link href="https://rssblog.ameba.jp/programingdiary/rss20.xml" rel="self" type="application/rss+xml" />
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com" />
<description>ブログの説明を入力します。</description>
<language>ja</language>
<item>
<title>CakePHPでAuthの設定方法（認証・移動先・権限処理・セッションを含む）</title>
<description>
<![CDATA[ <br><b>//コントローラーに記載</b><br><b>&nbsp;<layer highlight="term-4" class="searchwp-term searchwp-highlight-searchwp-highlighting">public</layer> <layer highlight="term-5" class="searchwp-term searchwp-highlight-searchwp-highlighting">$components</layer> = array(<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 'Session',<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 'Auth' =&gt; array(&nbsp;&nbsp;&nbsp; //ログイン機能を利用する。<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //ログインページのパス'<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 'loginAction' =&gt; array('controller' =&gt; 'users', 'action' =&gt; 'login'),<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //ログイン後の移動先<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 'loginRedirect' =&gt; array('controller' =&gt; 'users', 'action' =&gt; 'index'),<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //ログアウト後の移動先<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 'logoutRedirect' =&gt; array('controller' =&gt; 'users', 'action' =&gt; 'login'),<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //権限<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 'authorize' =&gt; array('Controller')</b><br><br><br>コントローラーの<layer highlight="term-5" class="searchwp-term searchwp-highlight-searchwp-highlighting">$components</layer>の中に、認証を利用したい場合はAuthを、セッション管理を利用する場合はSessionを記載する。<br><layer highlight="term-3" class="searchwp-term searchwp-highlight-searchwp-highlighting">isAuthorized</layer>を利用して権限設定したい場合は、Authのauthorizeに対象を記入する。<br>この場合はコントローラーの権限設定ができるようにとの意味。<br><br>ログインページと、ログイン後の移動先なども忘れずに設定しておこう。<br>
]]>
</description>
<link>https://ameblo.jp/programingdiary/entry-11972329447.html</link>
<pubDate>Fri, 02 Jan 2015 19:30:30 +0900</pubDate>
</item>
<item>
<title>Formヘルパーで日付セレクトボックスを詳細設定して表示させる方法</title>
<description>
<![CDATA[ 以下のサイトを参考にする。<br><br>http://tsyknsr.hatenablog.com/entry/2013/05/31/111130
]]>
</description>
<link>https://ameblo.jp/programingdiary/entry-11969219267.html</link>
<pubDate>Fri, 26 Dec 2014 11:12:06 +0900</pubDate>
</item>
<item>
<title>CakePHPでビューにおけるforeachの使い方</title>
<description>
<![CDATA[ PHPのforeachについて<br><br>コントローラー側：<br><b>$this-&gt;set('posts', $this-&gt;Post-&gt;find('all'));<br><br></b>ビュー側：<br><b>&lt;?php <br>foreach ($posts as $post): <br>&nbsp;echo $post['Post']['id']; <br>&nbsp;echo $post['Post']['created'];<br>endforeach;<br>unset($post); <br>?&gt;</b><br>
]]>
</description>
<link>https://ameblo.jp/programingdiary/entry-11969194091.html</link>
<pubDate>Fri, 26 Dec 2014 09:40:29 +0900</pubDate>
</item>
<item>
<title>ビューでhiddenフィールドを作成する。</title>
<description>
<![CDATA[ 記事を削除させたい場合などで、<br>ビューでidをhiddenフィールドで作成する方法。<b><br><br>echo $this-&gt;Form-&gt;input('id', array('type' =&gt; 'hidden'));<br><br></b>後は<b>、<br>echo $this-&gt;Form-&gt;submit('削除', array('name' =&gt; 'delete'));<br>echo $this-&gt;Form-&gt;end();<br></b><br>などでフォーム完成。<b><br></b>
]]>
</description>
<link>https://ameblo.jp/programingdiary/entry-11969121917.html</link>
<pubDate>Fri, 26 Dec 2014 01:15:49 +0900</pubDate>
</item>
<item>
<title>ビューでのテキスト出力</title>
<description>
<![CDATA[ ビューでのテキスト出力<br><br><b>echo (<layer highlight="term-2" class="searchwp-term searchwp-highlight-searchwp-highlighting">$this-&gt;request-&gt;data</layer>['ModelName']['columnname']);</b>
]]>
</description>
<link>https://ameblo.jp/programingdiary/entry-11969120516.html</link>
<pubDate>Fri, 26 Dec 2014 01:11:13 +0900</pubDate>
</item>
<item>
<title>Viewで別のコントローラーにリダイレクトする</title>
<description>
<![CDATA[ <font color="#FF0000">AのビューからBのビューにリダイレクトする場合。</font><br><br><b> echo $this-&gt;Html-&gt;link('Bに移動', array('controller' =&gt; 'B','action' =&gt; 'actionname', $A['A']['id']));<br><br></b>1番めの引数が画面に出力する名前、2番目の引数でオプション設定を行う。<br><br><b>controller　</b>コントローラー名を指定。自分にリダイレクトする場合記述しなくて良い。<br><b>action</b>　　　　コントローラーのファンクション名を指定する。<br><b>$A['A']['id'] </b>アクション先のファンクションで利用する引数を渡している。<br><br><br>
]]>
</description>
<link>https://ameblo.jp/programingdiary/entry-11968951117.html</link>
<pubDate>Thu, 25 Dec 2014 18:39:46 +0900</pubDate>
</item>
</channel>
</rss>
