本文整理汇总了PHP中X2Model::getModelTypesWhichSupportWorkflow方法的典型用法代码示例。如果您正苦于以下问题:PHP X2Model::getModelTypesWhichSupportWorkflow方法的具体用法?PHP X2Model::getModelTypesWhichSupportWorkflow怎么用?PHP X2Model::getModelTypesWhichSupportWorkflow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类X2Model
的用法示例。
在下文中一共展示了X2Model::getModelTypesWhichSupportWorkflow方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: paramRules
public function paramRules()
{
$workflows = Workflow::getList(false);
// no "none" options
$workflowIds = array_keys($workflows);
$stages = count($workflowIds) ? Workflow::getStagesByNumber($workflowIds[0]) : array('---');
$stages = array('' => Yii::t('app', 'Any')) + $stages;
return array('title' => Yii::t('studio', $this->title), 'modelClass' => 'modelClass', 'options' => array(array('name' => 'workflowId', 'label' => Yii::t('studio', 'Process'), 'type' => 'dropdown', 'options' => $workflows), array('name' => 'stageNumber', 'label' => Yii::t('studio', 'Stage'), 'type' => 'dependentDropdown', 'dependency' => 'workflowId', 'options' => $stages, 'optional' => true, 'optionsSource' => Yii::app()->createUrl('/workflow/workflow/getStageNames')), array('name' => 'modelClass', 'label' => Yii::t('studio', 'Associated Record Type'), 'type' => 'dropdown', 'options' => X2Model::getModelTypesWhichSupportWorkflow(true))));
}
示例2: array
<div class="row">
<div class='date-range-title'><?php
echo Yii::t('app', 'Stage Start Date:');
?>
</div>
<?php
$this->widget('DateRangeInputsWidget', array('startDateName' => 'start', 'startDateLabel' => Yii::t('workflow', 'Start Date'), 'startDateValue' => $dateRange['start'], 'endDateName' => 'end', 'endDateLabel' => Yii::t('app', 'End Date'), 'endDateValue' => $dateRange['end'], 'dateRangeName' => 'range', 'dateRangeLabel' => Yii::t('app', 'Date Range'), 'dateRangeValue' => $dateRange['range']));
?>
</div>
<div class="row row-no-title">
<div class="cell">
<?php
echo CHtml::label(Yii::t('app', 'Record Type'), 'modelType');
?>
<?php
echo CHtml::dropDownList('modelType', $modelType, X2Model::getModelTypesWhichSupportWorkflow(true, true), array('id' => 'workflow-model-type-filter'));
?>
</div>
</div>
<div class="row row-no-title">
<div class="cell">
<?php
echo CHtml::label(Yii::t('workflow', '{user}', array('{user}' => Modules::displayName(false, "Users"))), 'users');
echo CHtml::dropDownList('users', $users, array_merge(array('' => Yii::t('app', 'All')), User::getNames()));
?>
</div>
<?php
echo CHtml::hiddenField('id', $model->id);
?>
<div class="cell">
<?php
示例3: paramRules
public function paramRules()
{
$workflows = Workflow::getList(false);
// no "none" options
return array('title' => Yii::t('studio', $this->title), 'modelClass' => 'modelClass', 'options' => array(array('name' => 'workflowId', 'label' => Yii::t('studio', 'Process'), 'type' => 'dropdown', 'options' => $workflows), array('name' => 'modelClass', 'label' => Yii::t('studio', 'Associated Record Type'), 'type' => 'dropdown', 'options' => X2Model::getModelTypesWhichSupportWorkflow(true))));
}
示例4: array
?>
</div>
<div class="cell">
<?php
echo $form->labelEx($model, 'financial');
echo $form->checkBox($model, 'financial');
echo $form->error($model, 'financial');
?>
</div>
<div class="cell" id="financialModel" style="<?php
echo $model->financial ? '' : 'display:none;';
?>
">
<?php
echo $form->labelEx($model, 'financialModel');
echo $form->dropDownList($model, 'financialModel', X2Model::getModelTypesWhichSupportWorkflow(true, true), array('empty' => Yii::t('workflow', 'Select a model type')));
echo $form->error($model, 'financialModel');
?>
</div>
<div class="cell" id="financialField" style="<?php
echo $model->financial ? '' : 'display:none;';
?>
">
<?php
echo $form->labelEx($model, 'financialField');
$currencyFields = !empty($model->financialModel) ? Workflow::getCurrencyFields($model->financialModel) : array();
$emptyText = empty($currencyFields) ? Yii::t('workflow', 'Select a model') : Yii::t('workflow', 'Select a field');
echo $form->dropDownList($model, 'financialField', $currencyFields, array('empty' => $emptyText));
echo $form->error($model, 'financialField');
?>
</div>