2006-06-14 (水)
■ 現在実行中のアクション名を得る
現在実行中のアクション名を知りたい時、どうすれば良いか? Ethna のソースコードの中を探してみると、 Ethna_Controller クラスに、 getCurrentActionName() というメソッドがあるのを見つけた。 アクションクラスやビュークラスからなら、 $this->backend->ctl->getCurrentActionName() のようにたどれば値を得ることができる。
さらに、テンプレート中でもアクション名を参照できるようにしたいので、 ???_Controller クラスの _setDefaultTemplateEngine() メソッドに、 以下のコードを追加してみた。
$this->action_form->set('action', $this->action_name);
これで、テンプレート中から {$form.action} で、 現在のアクション名が得られるようになる。
[コメントを書く]
本日のリンク元
- 5 http://erokey.ddo.jp/diary2/タグ/リンク タグ/20070...
- 5 http://blogger.blog360.jp/552429/14416078
- 2 http://www.sfa-crm.com/word/チュートリアル/チュートリアル BL
- 2 google検索(zend アクション名)
- 2 http://press.eek.jp/result/ctl /ctl
- 1 http://www.revulo.com/
- 1 http://www.google.de/search?hl=de&q=getCurrentActi...
- 1 google検索(ethna javascript アクション)
- 1 google検索(ethna getCurrentActionName)
- 1 google検索(cakePHP setAction)
- 1 google検索(ethna 中)
- 1 google検索(getCurrentActionName)
- 1 google検索(getCurrentActionName)
- 1 google検索(ethna form action)
- 1 google検索(getCurrentActionName)
- 1 google検索(Ethna ビュークラスから テンプレート)
- 1 google検索(hiddenタグ ethna アクション)
- 1 google検索(getCurrentActionName)
- 1 google検索(formのactionを使わずに)
- 1 google検索(ethna javascript アクション)
- 1 google検索(ethna 現在実行中のアクション)
- 1 google検索(ethna 実行中のアクション)
- 1 google検索(ethna テンプレート アクション名)
- 1 google検索(cakephp setaction)
- 1 google検索(_setDefaultTemplateEngine)
- 1 google検索(Zend setAction)
- 1 google検索(JavaScript iframe アクション)
- 1 google検索(Ethna 実行中のaction)
- 1 google検索(Ethna filter plugin getCurrentActionName)
- 1 google検索(getCurrentActionName ethna)
- 1 google検索(ethna 実行中のアクション)
- 1 google検索(zend setAction)
- 1 google検索(getCurrentActionName)
- 1 google検索(Ethna 実行中のアクション)
- 1 google検索("zend framework" 実行中の)
- 1 google検索(Ethna 現在 )
- 1 http://www.google.co.jp/hws/search?q=ethna FORM ac...
- 1 http://some-lie.com/word/アクション/アクション ゲーム
- 1 http://green.search.goo.ne.jp/search?MT=cakePHP 現...
- 1 http://72.14.235.104/search?q=cache:Wg4UUuqhGL8J:w...
- 1 http://66.102.7.104/search?q=cache:CLz6ehhQEIQJ:bl...
- 1 http://209.85.175.104/search?q=cache:Wg4UUuqhGL8J:...
- 1 http://209.85.175.104/search?q=cache:Wg4UUuqhGL8J:...
