本文整理汇总了PHP中Catalog::getNamesByIds方法的典型用法代码示例。如果您正苦于以下问题:PHP Catalog::getNamesByIds方法的具体用法?PHP Catalog::getNamesByIds怎么用?PHP Catalog::getNamesByIds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Catalog
的用法示例。
在下文中一共展示了Catalog::getNamesByIds方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
$this->menu = array(array('label' => ProjectModule::t('Create Project Field'), 'url' => array('create')), array('label' => ProjectModule::t('Update Project Field'), 'url' => array('update', 'id' => $model->id)), array('label' => ProjectModule::t('Delete Project Field'), 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => UserModule::t('Are you sure to delete this item?'))), array('label' => ProjectModule::t('Manage Project Fields'), 'url' => array('admin')));
$this->widget('zii.widgets.CMenu', array('items' => $this->menu, 'htmlOptions' => array('class' => 'operations')));
?>
<h1><?php
//echo UserModule::t('View Project Field #').$model->varname;
echo UserModule::t('FieldOfOrders') . ' "' . $model->varname . '"';
?>
</h1>
<?php
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('id', 'varname', 'title', 'field_type', 'field_size', 'required', 'error_message', 'default', 'position', 'visible', array('label' => ProjectModule::t('Work types'), 'type' => 'raw', 'value' => $model->work_types == null ? '(' . UserModule::t("All") . ')' : Catalog::getNamesByIds($model->work_types, ', ')))));
示例2: array
</h1>
<?php
echo CHtml::link(UserModule::t('Edit assignments'), $this->createAbsoluteUrl('/rights/assignment/user', array('id' => $model->id))) . '<br /><br />';
$attributes = array('id', 'username', 'full_name', 'phone_number');
$mailing_list = 0;
if ($model->profile) {
$profile = ProfileField::model()->findAll();
if ($profile) {
foreach ($profile as $field) {
$arr = array('label' => UserModule::t($field->title), 'name' => $field->varname, 'type' => 'raw', 'value' => $field->widgetView($model->profile) ? $field->widgetView($model->profile) : ($field->range ? Profile::range($field->range, $model->profile->getAttribute($field->varname)) : $model->profile->getAttribute($field->varname)));
if ($field->varname == 'mailing_list') {
$index = $model->profile->getAttribute($field->varname);
if ($index > 3) {
$index = 0;
}
$_temp = array('', 'icq', 'sms', 'email');
$arr['value'] = $_temp[$index];
}
if ($field->field_type == "LIST") {
$arr['value'] = Catalog::getNamesByIds($model->profile->getAttribute($field->varname), '<br>');
}
array_push($attributes, $arr);
}
}
}
array_push($attributes, 'password', 'email', 'activkey', 'create_at', 'lastvisit_at', array('name' => 'superuser', 'value' => User::itemAlias("AdminStatus", $model->superuser)), array('name' => 'status', 'value' => User::itemAlias("UserStatus", $model->status)));
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => $attributes));
?>