caridy

caridy

这家伙有点懒,还没写个性签名!

  • 财富值480
  • 威望值0
  • 总积分510

个人信息

  • 搞定:

    public function getContactTypeOptions()
    {
      return CHtml::listData(ContactSys::model()->findAll(), 'type_en', 'type');
      //提示:这个地方,之前写$this->外连规则名,并没有执行查询.所以没有数据.提示大家注意.
    }
    

    视图中通过:

    <?php 
    echo $form->dropDownList($model,'contact_type',$model->getContactTypeOptions());
    ?>
    

    来调用即可.
    感谢各位的帮助.结帖.

  • 发布了话题
    求助:dropDownList (结帖,内有搞定的说明)
  • 已上传,1.6的那个,如果下载有问题请PM我修正.

  • 收藏 了...

  • 补充一下YIIBook官司论坛上看到的用法.:

    $this->widget('zii.widgets.CMenu', array(
    'activeCssClass'=>'当前热点元素的样式',
    'firstItemCssClass'=>'第一个元素的样式', 
    'lastItemCssClass'=>'最后一个元素的样式', 
    'htmlOptions'=>array('class'=>'默认样式'),
    'items'=>array(
    array('label'=>'Home', 'url'=>array('site/index')),
    array('label'=>'Products', 'url'=>array('product/index'), 'items'=>array(
    array('label'=>'New Arrivals', 'url'=>array('product/new', 'tag'=>'new')),
    array('label'=>'Most Popular', 'url'=>array('product/index', 'tag'=>'popular')),
    )),
    array('label'=>'Login', 'url'=>array('site/login'), 'visible'=>Yii::app()->user->isGuest),
    ),
    ));
    
  • 发布了话题
    设置当前频道在导航栏中的(激活)样式
  • 哇哈哈,竟然可以得到加精..除了自己瞎搞的论坛外,还是第一次..

  • AppSys Object
    (
      [_md:CActiveRecord:private] => CActiveRecordMetaData Object
      (
        [tableSchema] => CMysqlTableSchema Object
        (
          [schemaName] => 
          [name] => g_app_sys
          [rawName] => `g_app_sys`
          [primaryKey] => id
          [sequenceName] => 
          [foreignKeys] => Array
          (
          )
    
          [columns] => Array
          (
            [id] => CMysqlColumnSchema Object
            (
              [name] => id
              [rawName] => `id`
              [allowNull] => 
              [dbType] => int(11)
              [type] => integer
              [defaultValue] => 
              [size] => 11
              [precision] => 11
              [scale] => 
              [isPrimaryKey] => 1
              [isForeignKey] => 
              [autoIncrement] => 1
              [_e:CComponent:private] => 
              [_m:CComponent:private] => 
            )
    
            [name] => CMysqlColumnSchema Object
            (
              [name] => name
              [rawName] => `name`
              [allowNull] => 
              [dbType] => varchar(255)
              [type] => string
              [defaultValue] => 
              [size] => 255
              [precision] => 255
              [scale] => 
              [isPrimaryKey] => 
              [isForeignKey] => 
              [autoIncrement] => 
              [_e:CComponent:private] => 
              [_m:CComponent:private] => 
            )
    
            [name_en] => CMysqlColumnSchema Object
            (
              [name] => name_en
              [rawName] => `name_en`
              [allowNull] => 
              [dbType] => varchar(255)
              [type] => string
              [defaultValue] => 
              [size] => 255
              [precision] => 255
              [scale] => 
              [isPrimaryKey] => 
              [isForeignKey] => 
              [autoIncrement] => 
              [_e:CComponent:private] => 
              [_m:CComponent:private] => 
            )
            [is_audit] => CMysqlColumnSchema Object
            (
              [name] => is_audit
              [rawName] => `is_audit`
              [allowNull] => 
              [dbType] => tinyint(4)
              [type] => integer
              [defaultValue] => 0
              [size] => 4
              [precision] => 4
              [scale] => 
              [isPrimaryKey] => 
              [isForeignKey] => 
              [autoIncrement] => 
              [_e:CComponent:private] => 
              [_m:CComponent:private] => 
            )
    
          )
    
              [_e:CComponent:private] => 
              [_m:CComponent:private] => 
             )
    
              [columns] => Array
              (
                        [id] => CMysqlColumnSchema Object
                            (
                                [name] => id
                                [rawName] => `id`
                                [allowNull] => 
                                [dbType] => int(11)
                                [type] => integer
                               ...
                                [scale] => 
                                [isPrimaryKey] => 1
                                [isForeignKey] => 
                                [autoIncrement] => 1
                                [_e:CComponent:private] => 
                                [_m:CComponent:private] => 
                            )
    
                        [name] => CMysqlColumnSchema Object
                            (
                                [name] => name
                                [rawName] => `name`
                               ...
                                [scale] => 
                                [isPrimaryKey] => 
                                [isForeignKey] => 
                                [autoIncrement] => 
                                [_e:CComponent:private] => 
                                [_m:CComponent:private] => 
                            )
    
                        [name_en] => CMysqlColumnSchema Object
                            (
                                [name] => name_en
                                [rawName] => `name_en`
                                [allowNull] => 
                                [dbType] => varchar(255)
                                [type] => string
                                [defaultValue] => 
                                [size] => 255
                                [precision] => 255
                                [scale] => 
                                [isPrimaryKey] => 
                                [isForeignKey] => 
                                [autoIncrement] => 
                                [_e:CComponent:private] => 
                                [_m:CComponent:private] => 
                            )
    
                        [is_audit] => CMysqlColumnSchema Object
                            (
                                [name] => is_audit
                               ...
                                [_e:CComponent:private] => 
                                [_m:CComponent:private] => 
                            )
    
                    )
    
                [relations] => Array
                    (
                        [userAppRoles] => CHasManyRelation Object
                            (
                                [limit] => -1
                                [offset] => -1
                                [index] => 
                                [through] => 
                                [joinType] => LEFT OUTER JOIN
                                [on] => 
                                [alias] => 
                                [with] => Array
                                    (
                                    )
    
                                [together] => 
                                [name] => userAppRoles
                                [className] => UserAppRole
                                [foreignKey] => app_id
                                [select] => *
                                [condition] => 
                                [params] => Array
                                    (
                                    )
    
                                [group] => 
                                [join] => 
                                [having] => 
                                [order] => 
                                [_e:CComponent:private] => 
                                [_m:CComponent:private] => 
                            )
    
                    )
    
                [_model:CActiveRecordMetaData:private] => AppSys Object
                    (
                        [_md:CActiveRecord:private] => CActiveRecordMetaData Object
     *RECURSION*
                        [_new:CActiveRecord:private] => 
                        [_attributes:CActiveRecord:private] => Array
                            (
                            )
                        [_related:CActiveRecord:private] => Array
                            (
                            )
    
                        [_c:CActiveRecord:private] => 
                        [_pk:CActiveRecord:private] => 
                        [_alias:CActiveRecord:private] => t
                        [_errors:CModel:private] => Array
                            (
                            )
    
                        [_validators:CModel:private] => 
                        [_scenario:CModel:private] => 
                        [_e:CComponent:private] => 
                        [_m:CComponent:private] => 
                    )
    
            )
    
        [_new:CActiveRecord:private] => 
        [_attributes:CActiveRecord:private] => Array
            (
                [id] => 2
                [name] => 企业招聘
                [name_en] => recruiter
                [is_audit] => 1
            )
    
        [_related:CActiveRecord:private] => Array
            (
            )
    
        [_c:CActiveRecord:private] => 
        [_pk:CActiveRecord:private] => 2
        [_alias:CActiveRecord:private] => t
        [_errors:CModel:private] => Array
            (
            )
    
        [_validators:CModel:private] => 
        [_scenario:CModel:private] => update
        [_e:CComponent:private] => 
        [_m:CComponent:private] => 
    )
    
主管 等级规则
510/1000
资料完整度
30/100
用户活跃度
0/100

Ta的关注

0

Ta的粉丝

6

Ta的访客

20