Yii 1.0 Cheatsheet PDF
Yii 1.0 Cheatsheet PDF
Yii 1.0 Cheatsheet PDF
Static Methods
baseUrl, browser, cookies, hostInfo, isAjaxRequest, isPostRequest, isSecureConnection, pathInfo, preferredLanguage, queryString, requestUri, serverName, serverPort, url, urlReferrer, userAgent, userHost, userHostAddress sendFile($fn, $c, $mime=NULL, $t=true);
CHttpRequest Properties
CHtml is a static class that provides a collection of helper methods for creating HTML views. View API for more information and optional method parameters) For CActiveRecords: activeCheckbox($m, $a); activeCheckboxList($m, $a, $data); activeDropDownList($m, $a, $data); activeFileField($m, $a); activeHiddenField($m, $a); activeId($m, $a); activeLabel($m, $a); activeLabelEx($m, $a); activeListBox($m, $a, $data); activePasswordField($m, $a); activeRadioButton($m, $a); activeRadioButtonList($m, $a, $data); activeTextArea($m, $a); activeTextField($m, $a);
CHtml
Static Methods
Methods
CActiveRecord Properties
Static Methods
Public Methods
action, defaultAction, id, layout, module, pageTitle actions(); /*list of external actions*/ beginClip($id, $properties=array ( )); endClip($idclip=); beginWidget($className, $properties=array ( )); endWidget(string $id=''); missingAction(string $actionID); redirect($url, $terminate=true, $statusCode=302); refresh($terminate=true,$anchor=''); render($view, $data=NULL, $return=false); renderPartial($v, $d=NULL,$r=false, $processOutput=false); widget( $className, $properties=array ( ));
count($c=, $p=array ( )); onAfterDelete($e); delete(); onAfterInsert($e); deleteAll($c='', $p=array ( )); onAfterSave($e); nd($c='', $p=array ( )); onAfterValidate($e); ndAll($c='', $p=array ( )); onBeforeDelete($e); ndBySql($sql, $p=array ( )); onBeforeSave($e); hasErrors($a); onBeforeValidate($e); update($a=NULL); updateAll($a, $c='', $p=array ( )); updateByPk($pk, $a, $c='', $p=array ( )); validate();
Events
For CForm checkbox($n, $v); checkboxList($n, $v, $data); dropDownList($n, $c, $data); leField($n, $v); hiddenField($n, $v); label($n, $v); listBox($n, $v, $data); passwordField($n, $v); radioButton($n, $c); radioButtonList($n, $m, $data); textArea($n, $v); textField($n, $v);
CFormModel Properties
Public Methods
connection, text
CDbCommand Properties
bindParam($n, $v, $dt=NULL, $length=NULL); bindValue($n, $v, $dataType=NULL); execute(); query(); queryAll($fetchAssociative=true); queryColumn(); queryRow($fetchAssociative=true); queryScalar();
onAfterValidate($e); onBeforeValidate($e);
Events
Public Methods
active, autoCommit, autoConnect, charset, commandBuilder, connectionStatus, connectionString, currentTransaction, lastInsertId, password, schema, schemaCachingDuration, timeout, username quoteColumnName($name); quoteTableName($name); quoteValue($name);