本文整理汇总了PHP中Vtiger_Language_Handler::getAllLanguages方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Language_Handler::getAllLanguages方法的具体用法?PHP Vtiger_Language_Handler::getAllLanguages怎么用?PHP Vtiger_Language_Handler::getAllLanguages使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vtiger_Language_Handler
的用法示例。
在下文中一共展示了Vtiger_Language_Handler::getAllLanguages方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process
public function process(Vtiger_Request $request)
{
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
$qualifiedModuleName = $request->getModule(false);
$settings_block = $request->get('block');
$settings_fieldid = $request->get('fieldid');
$viewer->assign('LANGUAGES', Vtiger_Language_Handler::getAllLanguages());
$viewer->assign('ALL_MODULES', Vtiger_Module_Model::getEntityModules());
$viewer->assign('MODULE', $moduleName);
$viewer->assign('SETTINGS_BLOCK', $settings_block);
$viewer->assign('SETTINGS_FIELDID', $settings_fieldid);
echo $viewer->view('List.tpl', $qualifiedModuleName, true);
}
示例2: getPicklistValues
/**
* Function to get all the available picklist values for the current field
* @return <Array> List of picklist values if the field is of type picklist or multipicklist, null otherwise.
*/
public function getPicklistValues() {
if($this->get('uitype') == 32) {
return Vtiger_Language_Handler::getAllLanguages();
}
else if ($this->get('uitype') == '115') {
$db = PearDatabase::getInstance();
$query = 'SELECT '.$this->getFieldName().' FROM vtiger_'.$this->getFieldName();
$result = $db->pquery($query, array());
$num_rows = $db->num_rows($result);
$fieldPickListValues = array();
for($i=0; $i<$num_rows; $i++) {
$picklistValue = $db->query_result($result,$i,$this->getFieldName());
$fieldPickListValues[$picklistValue] = vtranslate($picklistValue,$this->getModuleName());
}
return $fieldPickListValues;
}
return parent::getPicklistValues();
}
示例3: getPicklistValues
/**
* Function to get all the available picklist values for the current field
* @return <Array> List of picklist values if the field is of type Languages.
*/
public function getPicklistValues()
{
return Vtiger_Language_Handler::getAllLanguages();
}