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


PHP X2Model::getRecordName方法代码示例

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


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

示例1: validate

 /**
  * Validates type of model that triggered the flow
  */
 public function validate(&$params = array(), $flowId = null)
 {
     $model = $params['model'];
     $modelName = get_class($model);
     // ensure that model can be associated with workflows
     if (!$model instanceof X2Model) {
         return array(false, Yii::t('studio', "Processes are not associated with records of this type"));
     } elseif (!$model->supportsWorkflow) {
         return array(false, Yii::t('studio', "{recordName} are not associated with processes", array('{recordName}' => ucfirst(X2Model::getRecordName($modelName)))));
     }
     return parent::validate($params, $flowId);
 }
开发者ID:keyeMyria,项目名称:CRM,代码行数:15,代码来源:BaseX2FlowWorkflowStageAction.php

示例2: renderSelectAllRecordsOnAllPagesStrip

 private function renderSelectAllRecordsOnAllPagesStrip()
 {
     echo '<div class="select-all-records-on-all-pages-strip-container" style="display: none;">
             <div class="select-all-notice">
             ' . Yii::t('app', 'All {count} {recordType} on this page have been selected. ' . '{clickHereLink} to select all {recordType} on all pages.', array('{count}' => '<b>' . $this->dataProvider->itemCount . '</b>', '{clickHereLink}' => '<a class="select-all-records-on-all-pages" href="#">' . Yii::t('app', 'Click here') . '</a>', '{recordType}' => X2Model::getRecordName($this->modelName, true))) . '
             </div>
             <div class="all-selected-notice" style="display: none;">
             ' . Yii::t('app', 'All {recordType} on all pages have been selected ({count} in total). ' . '{clickHereLink} to clear your selection.', array('{count}' => '<b>' . $this->dataProvider->totalItemCount . '</b>', '{clickHereLink}' => '<a class="unselect-all-records-on-all-pages" href="#">' . Yii::t('app', 'Click here') . '</a>', '{recordType}' => X2Model::getRecordName($this->modelName, true))) . '
             </div>
         </div>';
 }
开发者ID:tymiles003,项目名称:X2CRM,代码行数:11,代码来源:X2GridView.php

示例3: foreach

?>
    </ul>
    <?php 
foreach ($massActionObjs as $obj) {
    $obj->renderDialog($gridId, $modelName);
}
?>
</div>

</span>
<?php 
if (isset($modelName)) {
    ?>
<div class='mass-action-dialog double-confirmation-dialog' style='display: none;'>
    <span><?php 
    echo Yii::t('app', 'You are about to delete {count} {recordType}.', array('{recordType}' => X2Model::getRecordName($modelName, true), '{count}' => '<b>' . $gridObj->dataProvider->totalItemCount . '</b>'));
    echo Yii::t('app', 'This action cannot be undone.');
    ?>
        </br>
        </br>
        <?php 
    echo Yii::t('app', 'Please enter your password to confirm that you want to ' . 'delete the selected records.');
    ?>
</span>
    </br>
    </br>
    <?php 
    echo CHtml::label(Yii::t('app', 'Password:'), 'LoginForm[password]');
    ?>
    <input name="password" type='password'>
</div>
开发者ID:keyeMyria,项目名称:CRM,代码行数:31,代码来源:_x2GridViewMassActionButtons.php

示例4: getDialogTooltipsForModels

 /**
  * Returns array of tooltips to be applied to quick create buttons for each model 
  * @param array $models
  * @param string $modelName
  * @return array
  */
 public static function getDialogTooltipsForModels($models, $modelName)
 {
     $tooltips = array_flip($models);
     array_walk($tooltips, function (&$val, $key) use($modelName) {
         $val = Yii::t('app', 'Create a new {relatedModelClass} associated with this {modelClass}', array('{relatedModelClass}' => X2Model::getRecordName($key), '{modelClass}' => X2Model::getRecordName(X2Model::getModelName($modelName))));
     });
     return $tooltips;
 }
开发者ID:tymiles003,项目名称:X2CRM,代码行数:14,代码来源:QuickCreateRelationshipBehavior.php


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