当前位置: 首页>>代码示例>>PHP>>正文


PHP RSFormProHelper::getComponentPrice方法代码示例

本文整理汇总了PHP中RSFormProHelper::getComponentPrice方法的典型用法代码示例。如果您正苦于以下问题:PHP RSFormProHelper::getComponentPrice方法的具体用法?PHP RSFormProHelper::getComponentPrice怎么用?PHP RSFormProHelper::getComponentPrice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RSFormProHelper的用法示例。


在下文中一共展示了RSFormProHelper::getComponentPrice方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: sendSubmissionEmails


//.........这里部分代码省略.........
                 $multipleFields[] = $component->ComponentId;
             }
         } elseif ($component->ComponentTypeId == 2) {
             if ($component->PropertyName == 'WYSIWYG' && $component->PropertyValue == 'NO') {
                 $textareaFields[] = $component->ComponentId;
             }
         }
         $properties[$component->ComponentId][$component->PropertyName] = $component->PropertyValue;
     }
     // language
     $translations = RSFormProHelper::getTranslations('properties', $formId, $submission->Lang);
     foreach ($properties as $componentId => $componentProperties) {
         foreach ($componentProperties as $property => $value) {
             $reference_id = $componentId . '.' . $property;
             if (isset($translations[$reference_id])) {
                 $componentProperties[$property] = $translations[$reference_id];
             }
         }
         $properties[$componentId] = $componentProperties;
     }
     $secret = $config->get('secret');
     foreach ($properties as $ComponentId => $property) {
         // {component:caption}
         $placeholders[] = '{' . $property['NAME'] . ':caption}';
         $values[] = isset($property['CAPTION']) ? $property['CAPTION'] : '';
         // {component:description}
         $placeholders[] = '{' . $property['NAME'] . ':description}';
         $values[] = isset($property['DESCRIPTION']) ? $property['DESCRIPTION'] : '';
         // {component:name}
         $placeholders[] = '{' . $property['NAME'] . ':name}';
         $values[] = $property['NAME'];
         // {component:price}
         $placeholders[] = '{' . $property['NAME'] . ':price}';
         $values[] = RSFormProHelper::getComponentPrice($property, $submission);
         // {component:value}
         $placeholders[] = '{' . $property['NAME'] . ':value}';
         $value = '';
         if (isset($submission->values[$property['NAME']])) {
             $value = $submission->values[$property['NAME']];
             // Check if this is an upload field
             if (in_array($property['NAME'], $uploadFields)) {
                 $value = '<a href="' . JURI::root() . 'index.php?option=com_rsform&amp;task=submissions.view.file&amp;hash=' . md5($submission->SubmissionId . $secret . $property['NAME']) . $Itemid . '">' . basename($submission->values[$property['NAME']]) . '</a>';
             } elseif (in_array($ComponentId, $multipleFields)) {
                 $value = str_replace("\n", $form->MultipleSeparator, $value);
             } elseif ($form->TextareaNewLines && in_array($ComponentId, $textareaFields)) {
                 $value = nl2br($value);
             }
         }
         $values[] = $value;
         if (isset($property['ITEMS'])) {
             $placeholders[] = '{' . $property['NAME'] . ':text}';
             if (isset($submission->values[$property['NAME']])) {
                 $value = $submission->values[$property['NAME']];
                 $all_values = explode("\n", $value);
                 $all_texts = array();
                 $items = RSFormProHelper::explode(RSFormProHelper::isCode($property['ITEMS']));
                 $special = array('[c]', '[g]', '[d]');
                 foreach ($all_values as $v => $value) {
                     $all_texts[$v] = $value;
                     foreach ($items as $item) {
                         $item = str_replace($special, '', $item);
                         @(list($item_val, $item_text) = explode("|", $item, 2));
                         if ($item_text && $item_val == $value) {
                             $all_texts[$v] = $item_text;
                             break;
                         }
开发者ID:renekreijveld,项目名称:rsformpro-bootstrapped,代码行数:67,代码来源:rsform.php


注:本文中的RSFormProHelper::getComponentPrice方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。