This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function actions() | |
{ | |
return array( | |
'update' => array( | |
'class' => 'application.components.actions.UpdateAction', | |
'redirect' => 'index', // この行を追加 | |
), | |
); | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class HogeController extends Controller | |
{ | |
/** | |
* 単純な単一フィールド更新の例 | |
*/ | |
public function actionIsChecked($id) | |
{ | |
Hoge::model()->updateByPk($id, array('checked' => 1); | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return array( | |
... | |
'components' => array( | |
... | |
'db' => array( | |
... | |
'enableProfiling' => true, | |
'enableParamLogging' => true, | |
), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return array( | |
... | |
'import' => array( | |
... | |
'ext.bootstrap.components.*', // 追加 | |
), | |
... | |
'components' => array( | |
'bootstrap' => array('class' => 'ext.bootstrap.components.Bootstrap'), // 追加 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
... | |
<?php echo Yii::app()->bootstrap->registerBootstrap(); ?> | |
</head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $this->pageTitle = Yii::app()->name . ' - Login'; ?> | |
<?php $this->breadcrumbs = array('Login'); ?> | |
<div class="page-header"> | |
<h3> | |
Login | |
<small>登録済みの方は、こちらからログインしてください</small> | |
</h3> | |
</div><!-- /.page-header --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $this->pageTitle = Yii::app()->name . ' - Contact Us'; ?> | |
<?php $this->breadcrumbs = array('Contact'); ?> | |
<div class="page-header"> | |
<h3> | |
お問い合わせ | |
<small>以下のフォームにご記入の上、送信してください</small> | |
</h3> | |
</div><!-- /.page-header --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return array( | |
... | |
'components' => array( | |
'cache' => array( | |
'class' => 'CFileCache', | |
), | |
... | |
'db' => array( | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
... | |
'import' => array( | |
... | |
'ext.PasswordHash', | |
), | |
... | |
'params' => array( | |
'iteration_count_log2' => 12, | |
'portable_hashes' => false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class UserIdentity extends CUserIdentity | |
{ | |
private $id; | |
public function authenticate() | |
{ | |
$model = User::model()->findByAttributes(array( | |
'username' => $this->username, | |
)); |