本文整理汇总了PHP中FabrikWorker::logError方法的典型用法代码示例。如果您正苦于以下问题:PHP FabrikWorker::logError方法的具体用法?PHP FabrikWorker::logError怎么用?PHP FabrikWorker::logError使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FabrikWorker
的用法示例。
在下文中一共展示了FabrikWorker::logError方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSubOptionLabels
/**
* Get sub option labels
*
* @param array $data Form data. If submitting a form, we want to use that form's data and not
* re-query the form Model for its data as with multiple plugins of the same type
* this was getting the plugin params out of sync.
*
* @return array
*/
protected function getSubOptionLabels($data = array())
{
$phpOpts = $this->getPhpOptions($data);
if (!$phpOpts) {
$params = $this->getParams();
$opts = $params->get('sub_options', '');
$opts = $opts == '' ? array() : (array) @$opts->sub_labels;
} else {
/**
* Paul - According to tooltip, $phpOpts should be of form "array(JHTML::_('select.option', '1', 'one'))"
* This is an array of objects with properties text and value.
* If user has mis-specified this we should tell them.
*
* @FIXME - $$$ hugh - seems like an empty array should be valid as well?
**/
if (!is_array($phpOpts) || !$phpOpts[0] || !is_object($phpOpts[0]) || !isset($phpOpts[0]->value) || !isset($phpOpts[0]->text)) {
FabrikWorker::logError(sprintf(FText::_('COM_FABRIK_ELEMENT_SUBOPTION_ERROR'), $this->element->name, var_export($phpOpts, true)), 'error');
return array();
}
$opts = array();
foreach ($phpOpts as $phpOpt) {
$opts[] = $phpOpt->text;
}
}
foreach ($opts as &$opt) {
$opt = FText::_($opt);
}
return $opts;
}