本文整理汇总了PHP中ActiveRecord::behaviors方法的典型用法代码示例。如果您正苦于以下问题:PHP ActiveRecord::behaviors方法的具体用法?PHP ActiveRecord::behaviors怎么用?PHP ActiveRecord::behaviors使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActiveRecord
的用法示例。
在下文中一共展示了ActiveRecord::behaviors方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: behaviors
public function behaviors()
{
$bs = array('AdminBehavior' => array('class' => 'application.admin.components.behaviours.AdminBehavior', 'fields' => array(array('name' => 'Город', 'attribute' => 'name', 'type' => 'text'), array('name' => 'Регион', 'attribute' => 'regionId', 'type' => 'autocomplete', 'source' => Yii::app()->createUrl('site/region'), 'valueField' => 'regionId', 'textField' => 'name', 'value' => $this->region->name), array('name' => 'Страна', 'attribute' => 'countryId', 'type' => 'dropdown', 'data' => array('model' => Country::model()->findAll(), 'valueField' => 'countryId', 'textField' => 'name'))), 'columns' => array('cityId', 'name')));
return CMap::mergeArray(parent::behaviors(), $bs);
}
示例2: behaviors
public function behaviors()
{
$behaviors = CMap::mergeArray(parent::behaviors(), array('sortable' => array('class' => 'ext.sortable.SortableBehavior')));
return $behaviors;
}
示例3: behaviors
public function behaviors()
{
$bs = array('AdminBehavior' => array('class' => 'application.admin.components.behaviours.AdminBehavior', 'fields' => array(array('name' => 'Регион', 'attribute' => 'name', 'type' => 'text'), array('name' => 'Страна', 'attribute' => 'countryId', 'type' => 'dropdown', 'data' => array('model' => Country::model()->findAll(), 'valueField' => 'countryId', 'textField' => 'name'))), 'columns' => array('regionId', 'name')));
return CMap::mergeArray(parent::behaviors(), $bs);
}
示例4: behaviors
public function behaviors()
{
$bs = array('AdminBehavior' => array('class' => 'application.admin.components.behaviours.AdminBehavior', 'fields' => array(array('name' => 'Валюта', 'attribute' => 'name', 'type' => 'text')), 'columns' => array('currencyId', 'name')));
return CMap::mergeArray(parent::behaviors(), $bs);
}
示例5: behaviors
/**
*
* @var type
*/
public function behaviors()
{
$behaviors = array();
$behaviors['UserBehavior'] = array('class' => 'application.modules.users.components.behaviors.UserBehavior');
return array_merge(parent::behaviors(), $behaviors);
}
示例6: behaviors
public function behaviors()
{
return CMap::mergeArray(parent::behaviors(), array('Tag' => array('class' => 'application.components.activeRecordBehaviors.TagBehavior'), 'FileManager' => array('class' => 'application.components.activeRecordBehaviors.FileManagerBehavior', 'tags' => array('gallery' => array('title' => 'Галерея', 'data_type' => 'image'))), 'SportRel' => array('class' => 'application.modules.content.components.activeRecordBehaviors.SportRelBehavior')));
}
示例7: behaviors
public function behaviors()
{
$bs = array('AdminBehavior' => array('class' => 'application.admin.components.behaviours.AdminBehavior', 'fields' => array(array('name' => 'Email', 'attribute' => 'email', 'type' => 'text'), array('name' => 'Логин', 'attribute' => 'login', 'type' => 'text'), array('name' => 'Пароль', 'attribute' => 'password', 'type' => 'password'), array('name' => 'Имя', 'attribute' => 'name', 'type' => 'text'), array('name' => 'Фамилия', 'attribute' => 'lastName', 'type' => 'text'), array('name' => 'Телефон', 'attribute' => 'phone', 'type' => 'text')), 'columns' => array('adminUserId', 'name', 'lastName', 'email', 'phone')));
return CMap::mergeArray(parent::behaviors(), $bs);
}
示例8: behaviors
public function behaviors()
{
return CMap::mergeArray(parent::behaviors(), array('tree' => array('class' => 'application.components.activeRecordBehaviors.NestedSetBehavior', 'leftAttribute' => self::LFT, 'rightAttribute' => self::RGT, 'levelAttribute' => self::DEPTH)));
}
示例9: behaviors
public function behaviors()
{
$bs = array('AdminBehavior' => array('class' => 'application.admin.components.behaviours.AdminBehavior', 'fields' => array(array('name' => 'Название', 'attribute' => 'title', 'type' => 'text'), array('name' => 'Контент', 'attribute' => 'text', 'type' => 'textEditor')), 'columns' => array('pageId', 'title')));
return CMap::mergeArray(parent::behaviors(), $bs);
}
示例10: behaviors
public function behaviors()
{
return CMap::mergeArray(parent::behaviors(), array());
}
示例11: behaviors
public function behaviors()
{
return CMap::mergeArray(parent::behaviors(), ['FileManager' => ['class' => 'application.components.activeRecordBehaviors.FileManagerBehavior', 'tags' => ['files' => ['title' => 'Файлы', 'data_type' => 'image']]]]);
}
示例12: behaviors
public function behaviors()
{
$behaviors = parent::behaviors();
$behaviors['nestedSetBehavior'] = array('class' => 'application.components.activeRecordBehaviors.NestedSetBehavior', 'hasManyRoots' => true, 'leftAttribute' => 'left', 'rightAttribute' => 'right', 'levelAttribute' => 'level');
return $behaviors;
}
示例13: behaviors
public function behaviors()
{
return CMap::mergeArray(parent::behaviors(), ['NestedSet' => ['class' => 'application.components.activeRecordBehaviors.NestedSetBehavior', 'leftAttribute' => 'left', 'rightAttribute' => 'right', 'levelAttribute' => 'level', 'hasManyRoots' => true]]);
}