本文整理汇总了PHP中FabrikWorker::getJoomfishLang方法的典型用法代码示例。如果您正苦于以下问题:PHP FabrikWorker::getJoomfishLang方法的具体用法?PHP FabrikWorker::getJoomfishLang怎么用?PHP FabrikWorker::getJoomfishLang使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FabrikWorker
的用法示例。
在下文中一共展示了FabrikWorker::getJoomfishLang方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _addJavascript
//.........这里部分代码省略.........
$opts->ajax = $model->isAjax();
$opts->ajaxValidation = $params->get('ajax_validations');
$opts->primaryKey = $key;
$opts->error = @$form->origerror;
$opts->pages = $model->getPages();
$opts->plugins = array();
$opts->multipage_save = (bool) $model->saveMultiPage();
$opts->editable = $model->_editable;
$opts->start_page = $start_page;
$opts->inlineMessage = (bool) $this->isMambot;
//$$$rob dont int this as keys may be string
$opts->rowid = $model->_rowId;
//3.0 needed for ajax requests
$opts->listid = (int) $this->get('ListModel')->getId();
$imgs = new stdClass();
$imgs->alert = FabrikHelperHTML::image('alert.png', 'form', $this->tmpl, '', true);
$imgs->action_check = FabrikHelperHTML::image('action_check.png', 'form', $this->tmpl, '', true);
$imgs->ajax_loader = FabrikHelperHTML::image('ajax-loader.gif', 'form', $this->tmpl, '', true);
$opts->images = $imgs;
//$$$rob if you are loading a table in a window from a form db join select record option
// then we want to know the id of the window so we can set its showSpinner() method
$opts->fabrik_window_id = JRequest::getVar('fabrik_window_id', '');
//3.0 changed to fabrik_window_id (automatically appended by Fabrik.Window xhr request to load window data
//for editing groups with joined data and an empty joined record (ie no joined records)
$hidden = array();
$maxRepeat = array();
foreach ($this->groups as $g) {
$hidden[$g->id] = $g->startHidden;
$maxRepeat[$g->id] = $g->maxRepeat;
}
$opts->hiddenGroup = $hidden;
$opts->maxRepeat = $maxRepeat;
//$$$ rob 26/04/2011 joomfish translations of password validation error messages
$opts->lang = FabrikWorker::getJoomfishLang();
$opts = json_encode($opts);
$lang = new stdClass();
JText::script('COM_FABRIK_VALIDATING');
JText::script('COM_FABRIK_SUCCESS');
JText::script('COM_FABRIK_NO_REPEAT_GROUP_DATA');
JText::script('COM_FABRIK_VALIDATION_ERROR');
JText::script('COM_FABRIK_FORM_SAVED');
Jtext::script('COM_FABRIK_CONFIRM_DELETE');
//$$$ rob dont declare as var $bkey, but rather assign to window, as if loaded via ajax window the function is wrapped
// inside an anoymous function, and therefore $bkey wont be available as a global var in window
$str = "head.ready(function() {\r\n\t\t{$bkey} = new FbForm(" . $model->getId() . ", {$opts});\n";
//$str .= "$bkey.addListenTo('list_" . $listModel->getId() . "');\n";
//$str .= "$bkey.addListenTo('form_" . $model->getId() . "');\n";
$str .= "if(typeOf(Fabrik) !== 'null') {\n";
$str .= "Fabrik.addBlock('{$bkey}', {$bkey});\n";
$str .= "}\n\r\n\t\t});";
//instantaite js objects for each element
$vstr = "\n";
$str .= "{$startJs}";
$groups =& $model->getGroupsHiarachy();
// $$$ rob in php5.2.6 (and possibly elsewhere) $groups's elements havent been updated
// to contain the default value used by the element
//foreach ($groups as $groupModel) {
//testing this one again as Ive updated getGroupsHiarchy
$str .= "{$bkey}.addElements({";
foreach ($groups as $groupModel) {
$showGroup = $groupModel->getParams()->get('repeat_group_show_first');
if ($showGroup == -1 || $showGroup == 2 && $model->_editable) {
// $$$ rob unpublished group so dont include the element js
continue;
}
$aObjs = array();
示例2: elementJavascript
/**
* return tehe javascript to create an instance of the class defined in formJavascriptClass
* @return string javascript to create instance. Instance name must be 'el'
*/
function elementJavascript($repeatCounter)
{
$id = $this->getHTMLId($repeatCounter);
$params =& $this->getParams();
if ($params->get('cdd_display_type') == 'auto-complete') {
FabrikHelperHTML::autoComplete($id, $this->getElement()->id, 'fabrikcascadingdropdown');
}
$opts =& $this->getElementJSOptions($repeatCounter);
$opts->showPleaseSelect = $params->get('cascadingdropdown_showpleaseselect', true);
$opts->watch = $this->_getWatchId($repeatCounter);
$opts->id = $this->_id;
$opts->liveSite = COM_FABRIK_LIVESITE;
$opts->def = $this->getValue(array(), $repeatCounter);
$watchGroup = $this->_getWatchElement()->getGroup()->getGroup();
$group = $this->getGroup()->getGroup();
$opts->watchInSameGroup = $watchGroup->id === $group->id;
$opts->editing = $this->_editable && JRequest::getInt('rowid', 0) != 0 ? '1' : '0';
$opts->showDesc = $params->get('cdd_desc_column') === '' ? false : true;
$opts->lang = FabrikWorker::getJoomfishLang();
$opts = json_encode($opts);
return "new fbCascadingdropdown('{$id}', {$opts})";
}
示例3: _addJavascript
//.........这里部分代码省略.........
$opts->postMethod = $this->get('PostMethod');
$opts->ajaxValidation = $params->get('ajax_validations');
$opts->primaryKey = $key;
$opts->liveSite = COM_FABRIK_LIVESITE;
$opts->error = @$form->origerror;
$opts->pages = $model->getPages();
$opts->plugins = array();
$opts->multipage_save = (bool) $model->saveMultiPage();
$opts->editable = $model->_editable;
$opts->start_page = $start_page;
$opts->mooversion = FabrikWorker::getMooVersion() == 1 ? 1.2 : 1.1;
//$$$rob dont int this as keys may be string
$opts->rowid = $model->_rowId;
//$$$rob if you are loading a table in a window from a form db join select record option
// then we want to know the id of the window so we can set its showSpinner() method
$opts->winid = JRequest::getVar('winid', '');
//for editing groups with joined data and an empty joined record (ie no joined records)
$hidden = array();
$maxRepeat = array();
$showMaxRepeats = array();
$postedRepeatGroupCounts = (array) JRequest::getVar('fabrik_repeat_group');
foreach ($this->groups as $g) {
$hidden[$g->id] = $g->startHidden;
if (JArrayHelper::getValue($postedRepeatGroupCounts, $g->id, 1) == 0) {
$hidden[$g->id] = true;
}
$maxRepeat[$g->id] = $g->maxRepeat;
$showMaxRepeats[$g->id] = $g->showMaxRepeats;
}
$opts->hiddenGroup = $hidden;
$opts->maxRepeat = $maxRepeat;
$opts->showMaxRepeats = $showMaxRepeats;
//$$$ rob 26/04/2011 joomfish translations of password validation error messages
$opts->lang = FabrikWorker::getJoomfishLang();
// $$$ hugh adding these so calc element can easily find joined and repeated join groups
// when it needs to add observe events ... don't ask ... LOL!
$opts->join_group_ids = array();
$opts->group_repeats = array();
$opts->group_joins_ids = array();
$groups =& $model->getGroupsHiarachy();
foreach ($groups as $groupModel) {
if ($groupModel->getGroup()->is_join) {
$opts->join_group_ids[$groupModel->getGroup()->join_id] = (int) $groupModel->getGroup()->id;
$opts->group_join_ids[$groupModel->getGroup()->id] = (int) $groupModel->getGroup()->join_id;
$opts->group_repeats[$groupModel->getGroup()->id] = $groupModel->canRepeat();
}
}
$opts = json_encode($opts);
$lang = new stdClass();
$lang->validation_altered_content = JText::_('VALIDATION_HAS_ALTERED_CONTENT');
$lang->validating = JText::_('VALIDATING');
$lang->success = JText::_('SUCCESS');
$lang->nodata = JText::_('NOREPEATGROUPDATA');
$lang->validation_error = JText::_('VALIDATION_ERROR');
$lang->form_saved = JText::_('FORM_SAVED');
$lang->confirmDelete = JText::_('CONFIRMDELETE');
$lang = json_encode($lang);
//$$$ rob dont declare as var $bkey, but rather assign to window, as if loaded via ajax window the function is wrapped
// inside an anoymous function, and therefore $bkey wont be available as a global var in window
$str = "window.{$bkey} = new fabrikForm(" . $model->getId() . ", {$opts}, {$lang});\n";
$str .= "{$bkey}.addListenTo('table_" . $tableModel->getId() . "');\n";
$str .= "{$bkey}.addListenTo('form_" . $model->getId() . "');\n";
$str .= "if(\$type(window.oPackage) !== false) {\n";
$str .= "oPackage.addBlock('{$bkey}', {$bkey});\n";
$str .= "}\n";
//instantaite js objects for each element