當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CostbenefitprojectionHelper::getCauseRiskDetails方法代碼示例

本文整理匯總了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>';
                }
開發者ID:namibia,項目名稱:CBP-Joomla-3-Component,代碼行數:31,代碼來源:companydetails.php


注:本文中的CostbenefitprojectionHelper::getCauseRiskDetails方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。