当前位置: 首页>>代码示例>>PHP>>正文


PHP ActiveRecord::behaviors方法代码示例

本文整理汇总了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);
 }
开发者ID:arossokha,项目名称:ex-comment,代码行数:5,代码来源:City.php

示例2: behaviors

 public function behaviors()
 {
     $behaviors = CMap::mergeArray(parent::behaviors(), array('sortable' => array('class' => 'ext.sortable.SortableBehavior')));
     return $behaviors;
 }
开发者ID:blindest,项目名称:Yii-CMS-2.0,代码行数:5,代码来源:Banner.php

示例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);
 }
开发者ID:arossokha,项目名称:ex-comment,代码行数:5,代码来源:Region.php

示例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);
 }
开发者ID:arossokha,项目名称:ex-comment,代码行数:5,代码来源:Currency.php

示例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);
 }
开发者ID:jacjimus,项目名称:furahia_mis,代码行数:10,代码来源:Child.php

示例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')));
 }
开发者ID:blindest,项目名称:Yii-CMS-2.0,代码行数:4,代码来源:Page.php

示例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);
 }
开发者ID:arossokha,项目名称:ex-comment,代码行数:5,代码来源:AdminUser.php

示例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)));
 }
开发者ID:nizsheanez,项目名称:kur.ru,代码行数:4,代码来源:Metric.php

示例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);
 }
开发者ID:arossokha,项目名称:ex-comment,代码行数:5,代码来源:Page.php

示例10: behaviors

 public function behaviors()
 {
     return CMap::mergeArray(parent::behaviors(), array());
 }
开发者ID:nizsheanez,项目名称:kur.ru,代码行数:4,代码来源:Edge.php

示例11: behaviors

 public function behaviors()
 {
     return CMap::mergeArray(parent::behaviors(), ['FileManager' => ['class' => 'application.components.activeRecordBehaviors.FileManagerBehavior', 'tags' => ['files' => ['title' => 'Файлы', 'data_type' => 'image']]]]);
 }
开发者ID:blindest,项目名称:Yii-CMS-2.0,代码行数:4,代码来源:MediaAlbum.php

示例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;
 }
开发者ID:blindest,项目名称:Yii-CMS-2.0,代码行数:6,代码来源:Comment.php

示例13: behaviors

 public function behaviors()
 {
     return CMap::mergeArray(parent::behaviors(), ['NestedSet' => ['class' => 'application.components.activeRecordBehaviors.NestedSetBehavior', 'leftAttribute' => 'left', 'rightAttribute' => 'right', 'levelAttribute' => 'level', 'hasManyRoots' => true]]);
 }
开发者ID:blindest,项目名称:Yii-CMS-2.0,代码行数:4,代码来源:MenuSection.php


注:本文中的ActiveRecord::behaviors方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。