本文整理汇总了PHP中CostbenefitprojectionHelper::getCauseRiskDetails方法的典型用法代码示例。如果您正苦于以下问题:PHP CostbenefitprojectionHelper::getCauseRiskDetails方法的具体用法?PHP CostbenefitprojectionHelper::getCauseRiskDetails怎么用?PHP CostbenefitprojectionHelper::getCauseRiskDetails使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CostbenefitprojectionHelper
的用法示例。
在下文中一共展示了CostbenefitprojectionHelper::getCauseRiskDetails方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$user = JFactory::getUser();
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $displayData->checked_out == $user->id || $displayData->checked_out == 0;
$userChkOut = JFactory::getUser($displayData->checked_out);
$canDo = CostbenefitprojectionHelper::getActions('company', $displayData, 'companies');
// setup the cause risk list
$causesrisks = '<div class="uk-alert">' . JText::_('COM_COSTBENEFITPROJECTION_NO_CAUSERISK_SELECTED') . '</div>';
if (isset($displayData->causesrisks) && CostbenefitprojectionHelper::checkArray($displayData->causesrisks)) {
$causesrisks = '';
$body = '';
$keys = array('name' => JText::_('COM_COSTBENEFITPROJECTION_NAME'), 'description' => JText::_('COM_COSTBENEFITPROJECTION_DESCRIPTION'), 'ref' => JText::_('REF'), 'importname' => JText::_('COM_COSTBENEFITPROJECTION_FULL_NAME'));
$getValues = array('name', 'description', 'ref', 'importname');
// header switces
$dataSwitch = array('name' => ' data-toggle="true"', 'description' => ' data-hide="phone"', 'ref' => ' data-hide="phone,tablet"', 'importname' => ' data-hide="all"');
foreach ($displayData->causesrisks as $id) {
// get cause risk details
$details = CostbenefitprojectionHelper::getCauseRiskDetails($id, $getValues);
if (CostbenefitprojectionHelper::checkObject($details)) {
// build the dl list
$row = '<tr>';
foreach ($details as $title => $value) {
// fix the ref display
if ('ref' == $title) {
$key = explode('.0', $value);
$sort = explode('.', $value);
$value = implode('.', $key);
$sort = implode('', $key);
// now set
$row .= '<td data-value="' . $sort . '">' . $value . '</td>';
} else {
$row .= '<td>' . $value . '</td>';
}