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 LoginForm extends CFormModel | |
{ | |
private $loginLabel; | |
public $login; | |
public $password; | |
public $rememberMe; | |
/** |
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 Flash extends CWidget | |
{ | |
public $keys = array( | |
'success', | |
'info', | |
'warning', | |
'error', | |
); |
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 Profile extends CActiveRecord | |
{ | |
... | |
/** | |
* @see Cmodel::rules() | |
*/ | |
public function rules() | |
{ | |
return 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 | |
class Hoge extends CActiveRecord | |
{ | |
... | |
/** | |
* 最新のデータを$limit分取得する | |
*/ | |
public function getRecent($limit=5) | |
{ | |
$c = new CDbCriteria; |
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 LinkPager extends CLinkPager | |
{ | |
/** | |
* @see CLinkPager::init() | |
*/ | |
public function init() | |
{ | |
$this->firstPageLabel = '««'; | |
$this->prevPageLabel = '«'; |
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( | |
... | |
'viewRenderer' => array( | |
'class' => 'ext.ETwigViewRenderer', | |
'globals' => array( | |
'Yii' => 'Yii', | |
'Captcha' => 'CCaptcha', | |
), |
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
<div class="form"> | |
{% set form = this.beginWidget('CActiveForm', { | |
'id': 'hoge-form', | |
'enableAjaxValidation': false, | |
}) %} | |
<p class="note">Fields with <span class="required">*</span> are required.</p> | |
{{ form.errorSummary(model) }} | |
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 | |
Yii::import('zii.widgets.jui.CJuiDatePicker'); | |
/** | |
* MyDatePicker class file. | |
*/ | |
class MyDatePicker extends CJuiDatePicker | |
{ | |
/** | |
* @see CJuiDatePicker::language |
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 | |
/** | |
* FlashBehavior class file. | |
*/ | |
class FlashBehavior extends CActiveRecordBehavior | |
{ | |
/** | |
* @var string key identifying the flash message | |
*/ | |
public $key = 'success'; |
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 Item extends ActiveRecord | |
{ | |
... | |
/** | |
* @see CActiveRecord::afterValidate() | |
*/ | |
protected function afterValidate() | |
{ | |
if (!$this->hasErrors()) { |