本文整理汇总了PHP中ProductCategory::getModelLabelByTypeAndLanguage方法的典型用法代码示例。如果您正苦于以下问题:PHP ProductCategory::getModelLabelByTypeAndLanguage方法的具体用法?PHP ProductCategory::getModelLabelByTypeAndLanguage怎么用?PHP ProductCategory::getModelLabelByTypeAndLanguage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProductCategory
的用法示例。
在下文中一共展示了ProductCategory::getModelLabelByTypeAndLanguage方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderContent
protected function renderContent()
{
$singularLabel = ProductCategory::getModelLabelByTypeAndLanguage('Singular');
$pluralLabel = Zurmo::t('ProductTemplatesModule', 'Categories');
$content = $this->renderViewToolBar(false);
$content .= '<div>';
$content .= $this->renderTreeMenu('productCategory', 'productCategories', $singularLabel);
$content .= '</div>';
return $content;
}
示例2: renderControlEditable
/**
* @return string
*/
protected function renderControlEditable()
{
assert('$this->model instanceof Product || $this->model instanceof Product');
$cClipWidget = new CClipWidget();
$cClipWidget->beginClip("ModelElement");
$cClipWidget->widget('application.core.widgets.MultiSelectAutoComplete', array('name' => $this->getNameForIdField(), 'id' => $this->getIdForIdField(), 'jsonEncodedIdsAndLabels' => CJSON::encode($this->getExistingProductCategoriesRelationsIdsAndLabels()), 'sourceUrl' => Yii::app()->createUrl('productTemplates/default/autoCompleteAllProductCategoriesForMultiSelectAutoComplete'), 'htmlOptions' => array('disabled' => $this->getDisabledValue()), 'hintText' => Zurmo::t('ProductsModule', 'Type a ' . ProductCategory::getModelLabelByTypeAndLanguage('SingularLowerCase'), LabelUtil::getTranslationParamsForAllModules())));
$cClipWidget->endClip();
$content = $cClipWidget->getController()->clips['ModelElement'];
return $content;
}
示例3: renderContent
/**
* Override because we do not need to render
* the view tool bar or any extra spacing.
*/
protected function renderContent()
{
return $this->renderTreeMenu('productCategory', 'productCategories', ProductCategory::getModelLabelByTypeAndLanguage('Plural'));
}
示例4: getCreateLinkDisplayLabel
protected function getCreateLinkDisplayLabel()
{
$singularLabel = ProductCategory::getModelLabelByTypeAndLanguage('Singular');
return Zurmo::t('ProductTemplatesModule', 'Create ' . $singularLabel, LabelUtil::getTranslationParamsForAllModules());
}
示例5: translatedAttributeLabels
/**
* @return array
*/
protected static function translatedAttributeLabels($language)
{
$params = LabelUtil::getTranslationParamsForAllModules();
return array_merge(parent::translatedAttributeLabels($language), array('productTemplate' => Zurmo::t('ProductTemplatesModule', 'ProductTemplatesModuleSingularLabel', $params, null, $language), 'products' => Zurmo::t('ProductsModule', 'ProductsModulePluralLabel', $params, null, $language), 'sellPriceFormula' => Zurmo::t('ProductTemplatesModule', 'Sell Price Formula', array(), null, $language), 'productCategories' => ProductCategory::getModelLabelByTypeAndLanguage('Plural', $language), 'cost' => Zurmo::t('ProductTemplatesModule', 'Cost', array(), null, $language), 'listPrice' => Zurmo::t('ProductTemplatesModule', 'List Price', array(), null, $language), 'sellPrice' => Zurmo::t('ProductTemplatesModule', 'Sell Price', array(), null, $language), 'type' => Zurmo::t('ProductTemplatesModule', 'Type', array(), null, $language), 'status' => Zurmo::t('ProductTemplatesModule', 'Status', array(), null, $language)));
}
示例6: getHomeLinkLabel
protected function getHomeLinkLabel()
{
$pluralLabel = ProductCategory::getModelLabelByTypeAndLanguage('Plural');
return Zurmo::t('ProductTemplatesModule', $pluralLabel . ' Home');
}
示例7: resolveConfirmAlertInHtmlOptions
/**
* Resolve the alert display in html options
* @param array $htmlOptions
* @return array
*/
protected function resolveConfirmAlertInHtmlOptions($htmlOptions)
{
$htmlOptions['confirm'] = Zurmo::t('Core', 'Are you sure you want to delete this {modelLabel}?', array('{modelLabel}' => ProductCategory::getModelLabelByTypeAndLanguage('Singular')));
return $htmlOptions;
}
示例8: getHomeLinkLabel
protected function getHomeLinkLabel()
{
$pluralLabel = ProductCategory::getModelLabelByTypeAndLanguage('Plural');
$pluralLabel = Zurmo::t('ProductTemplatesModule', $pluralLabel, LabelUtil::getTranslationParamsForAllModules());
return Zurmo::t('ProductTemplatesModule', '{pluralLabel} Home', array('{pluralLabel}' => $pluralLabel));
}