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


PHP Groups::getNames方法代码示例

本文整理汇总了PHP中Groups::getNames方法的典型用法代码示例。如果您正苦于以下问题:PHP Groups::getNames方法的具体用法?PHP Groups::getNames怎么用?PHP Groups::getNames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Groups的用法示例。


在下文中一共展示了Groups::getNames方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getAssignmentOptions

 /**
  * Returns assignment selection options
  * @param type $anyone
  * @param type $showGroups
  * @param type $showSeparator
  * @return type
  */
 public static function getAssignmentOptions($anyone = true, $showGroups = true, $showSeparator = true)
 {
     $users = User::getNames();
     if ($anyone !== true) {
         unset($users['Anyone']);
     }
     if ($showGroups === true) {
         $groups = Groups::getNames();
         if (count($groups) > 0) {
             if ($showSeparator) {
                 $users = $users + array('' => '--------------------') + $groups;
             } else {
                 $users = $users + $groups;
             }
         }
     }
     return $users;
 }
开发者ID:tymiles003,项目名称:X2CRM,代码行数:25,代码来源:X2Model.php

示例2: array

// $cs->registerScript(__CLASS__,     $this->defaultOptions?'jQuery.{$this->mode}picker.setDefaults('.CJavaScript::encode($this->defaultOptions).');':'');
// $cs->registerScript(__CLASS__.'#'.$id, $js);
$fieldTypes = array();
$fieldLinkTypes = array();
$fieldOptions = array();
foreach ($itemModel->getFields() as $field) {
    $fieldTypes[$field->fieldName] = $field->type;
    if (!empty($field->linkType)) {
        $fieldLinkTypes[$field->fieldName] = $field->linkType;
    }
    switch ($field->type) {
        case 'dropdown':
            $fieldOptions[$field->fieldName] = Dropdowns::getItems($field->linkType);
            break;
        case 'assignment':
            $fieldOptions[$field->fieldName] = User::getNames() + Groups::getNames();
            break;
        case 'link':
            $fieldOptions[$field->fieldName] = Yii::app()->request->scriptUrl . X2Model::model($field->linkType)->autoCompleteSource;
            break;
    }
}
$attributeLabels = $model->itemAttributeLabels;
//hack tags in
$fieldTypes['tags'] = 'tags';
$fieldOptions['tags'] = Tags::getAllTags();
$attributeLabels['tags'] = Yii::t('contacts', 'Tags');
natcasesort($attributeLabels);
$comparisonList = array('=' => Yii::t('contacts', 'equals'), '>' => Yii::t('contacts', 'greater than'), '<' => Yii::t('contacts', 'less than'), '<>' => Yii::t('contacts', 'not equal to'), 'list' => Yii::t('contacts', 'in list'), 'notList' => Yii::t('contacts', 'not in list'), 'empty' => Yii::t('contacts', 'empty'), 'notEmpty' => Yii::t('contacts', 'not empty'), 'contains' => Yii::t('contacts', 'contains'), 'noContains' => Yii::t('contacts', 'does not contain'));
$criteriaAttr = array();
foreach ($criteriaModels as $criterion) {
开发者ID:dsyman2,项目名称:X2CRM,代码行数:31,代码来源:_listForm.php

示例3: array

</label>
	<?php 
echo $form->dropDownList($admin, 'srrId', User::getUserIds());
?>
</div>

<div id="group-list" style="<?php 
echo !empty($admin->serviceDistribution) && $admin->serviceDistribution == "singleGroup" ? "" : "display:none;";
?>
">
	<label><?php 
echo Yii::t('admin', 'Selected Group');
?>
</label>
	<?php 
echo $form->dropDownList($admin, 'sgrrId', Groups::getNames());
?>
</div>

    <?php 
echo $form->labelEx($admin, 'serviceOnlineOnly');
echo $form->dropDownList($admin, 'serviceOnlineOnly', array('0' => Yii::t('app', 'No'), '1' => Yii::t('app', 'Yes')));
?>

<?php 
echo CHtml::submitButton(Yii::t('app', 'Save'), array('class' => 'x2-button')) . "\n";
$this->endWidget();
?>
</div>
<div class="form">
<b><?php 
开发者ID:dsyman2,项目名称:X2CRM,代码行数:31,代码来源:serviceRouting.php

示例4: actionGetGroups

 public function actionGetGroups()
 {
     $checked = false;
     if (isset($_POST['checked'])) {
         // coming from a group checkbox?
         $checked = json_decode($_POST['checked']);
     } elseif (isset($_POST['group'])) {
         $checked = true;
     }
     $id = null;
     if (isset($_POST['field'])) {
         $id = $_POST['field'];
     }
     $options = array();
     if ($checked) {
         // group checkbox checked, return list of groups
         echo CHtml::listOptions($id, Groups::getNames(), $options);
     } else {
         // group checkbox unchecked, return list of user names
         $users = User::getNames();
         if (!in_array($id, array_keys($users))) {
             $id = Yii::app()->user->getName();
         }
         echo CHtml::listOptions($id, $users, $options);
     }
 }
开发者ID:keyeMyria,项目名称:CRM,代码行数:26,代码来源:GroupsController.php

示例5: array

?>
				<a onclick="x2.forms.submitForm('chart');" href="#" class="x2-button"><span><?php 
echo Yii::t('app', 'Go');
?>
</span></a>
			</div>
		</div>
	</div>
	<div class="x2-chart-container-controls">
		<div class="x2-chart-control">
			<div class="row">
				<?php 
echo $form->label($model, 'assignedTo', array('label' => Yii::t('charts', 'Select deals assigned to') . '&nbsp;&nbsp;&nbsp;&nbsp;'));
?>
				<?php 
echo $form->dropDownList($model, 'assignedTo', array_merge(array('0' => 'All'), Groups::getNames(), User::getNames()));
?>
				<a onclick="x2.forms.submitForm('chart');" href="#" class="x2-button"><span><?php 
echo Yii::t('app', 'Go');
?>
</span></a>
			</div>
		</div>
	</div>
	<p class="x2-chart-separator"/>
	<div class="x2-chart-container-center-large">
		<?php 
$this->widget('X2BubbleChart', array('model' => $sqlView, 'options' => array('other-threshold' => 2, 'statistic' => 'none', 'orderby' => 'dealValue asc', 'slice' => array('part' => $slice), 'x-axis' => array('column' => "round((closeDate-unix_timestamp())/(24*3600))"), 'y-axis' => array('column' => 'round(dealValue)'), 'r-axis' => array('column' => 'confidence', 'label' => "concat('\$',format(dealValue,2))")), 'filters' => $filters, 'chartOptions' => array('title' => Yii::t('charts', 'Deals'), 'axes' => array('yaxis' => array('label' => Yii::t('charts', 'Value'), 'tickOptions' => array('formatString' => '$%d')), 'xaxis' => array('label' => Yii::t('charts', 'Days To Close'))))));
?>
	</div>
	<p class="x2-chart-separator"/>
开发者ID:dsyman2,项目名称:X2CRM,代码行数:31,代码来源:pipeline.php


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