當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。