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


PHP AppletInstance::getDropZoneValue方法代码示例

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


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

示例1: dropZone

 public static function dropZone($name = 'dropZone', $label = 'Drop applet here')
 {
     $link = AppletInstance::getDropZoneValue($name);
     $applet_id = null;
     $type = '';
     $icon_url = '';
     if (!empty($link) && is_string($link)) {
         $applet_id = explode('/', $link);
         $applet_id = $applet_id[count($applet_id) - 1];
     }
     if (!empty($applet_id) && isset(Applet::$flow_data[$applet_id])) {
         $applet = Applet::$flow_data[$applet_id];
         $type = $applet->type;
         $icon_url = '';
         $label = $applet->name;
         $type_parts = explode("---", $type);
         $plugin_name = $type_parts[0];
         $applet_name = $type_parts[1];
         $icon_url = real_site_url('plugins/' . $plugin_name . '/applets/' . $applet_name . '/icon.png');
     } else {
         if (!isset(Applet::$flow_data[$applet_id]) && !empty($applet_id)) {
             /* handling this gracefully in case of bad programmer */
             $applet_id = null;
             $link = null;
         }
     }
     $widget = new DropZoneWidget($name, $label, $type, $icon_url, $link);
     return $widget->render();
 }
开发者ID:howethomas,项目名称:OpenVBX,代码行数:29,代码来源:AppletUI.php

示例2: Response

<?php

$response = new Response();
/* Fetch all the data to operate the menu */
$digits = isset($_REQUEST['Digits']) ? $_REQUEST['Digits'] : false;
$prompt = AppletInstance::getAudioSpeechPickerValue('prompt');
$invalid_option = AppletInstance::getAudioSpeechPickerValue('invalid-option');
$repeat_count = AppletInstance::getValue('repeat-count', 3);
$next = AppletInstance::getDropZoneUrl('next');
$selected_item = false;
/* Build Menu Items */
$choices = AppletInstance::getDropZoneUrl('choices[]');
$keys = AppletInstance::getDropZoneValue('keys[]');
$menu_items = AppletInstance::assocKeyValueCombine($keys, $choices);
$numDigits = 1;
foreach ($keys as $key) {
    if (strlen($key) > $numDigits) {
        $numDigits = strlen($key);
    }
}
if ($digits !== false) {
    if (!empty($menu_items[$digits])) {
        $selected_item = $menu_items[$digits];
    } else {
        if ($invalid_option) {
            $verb = AudioSpeechPickerWidget::getVerbForValue($invalid_option, null);
            $response->append($verb);
            $response->addRedirect();
        } else {
            $response->addSay('You selected an incorrect option.');
            $response->addRedirect();
开发者ID:joshgomez,项目名称:OpenVBX,代码行数:31,代码来源:twiml.php

示例3: Response

<?php

$response = new Response();
/* Fetch all the data to operate the menu */
$digits = isset($_REQUEST['Digits']) ? $_REQUEST['Digits'] : false;
$prompt = AppletInstance::getAudioSpeechPickerValue('prompt');
$invalid_option = AppletInstance::getAudioSpeechPickerValue('invalid-option');
$repeat_count = AppletInstance::getValue('repeat-count', 3);
$next = AppletInstance::getDropZoneUrl('next');
$selected_item = false;
/* Build Menu Items */
$choices = (array) AppletInstance::getDropZoneUrl('choices[]');
$keys = (array) AppletInstance::getDropZoneValue('keys[]');
$menu_items = AppletInstance::assocKeyValueCombine($keys, $choices);
$numDigits = 1;
foreach ($keys as $key) {
    if (strlen($key) > $numDigits) {
        $numDigits = strlen($key);
    }
}
if ($digits !== false) {
    if (!empty($menu_items[$digits])) {
        $selected_item = $menu_items[$digits];
    } else {
        if ($invalid_option) {
            $verb = AudioSpeechPickerWidget::getVerbForValue($invalid_option, null);
            $response->append($verb);
            $response->addRedirect();
        } else {
            $response->addSay('You selected an incorrect option.');
            $response->addRedirect();
开发者ID:JeffaCubed,项目名称:OpenVBX,代码行数:31,代码来源:twiml.php

示例4: array

<?php

$defaultNumberOfChoices = 1;
$timestart = AppletInstance::getValue('timestart[]', array('--'));
$timefinish = AppletInstance::getValue('timefinish[]', array('--'));
$sunday = AppletInstance::getValue('sunday[]');
$monday = AppletInstance::getValue('monday[]');
$tuesday = AppletInstance::getValue('tuesday[]');
$wednesday = AppletInstance::getValue('wednesday[]');
$thursday = AppletInstance::getValue('thursday[]');
$friday = AppletInstance::getValue('friday[]');
$saturday = AppletInstance::getValue('saturday[]');
$ci_timezone = AppletInstance::getValue('timezones');
$choices = AppletInstance::getDropZoneValue('choices[]');
$days = AppletInstance::getValue('days');
function day_check($day, $key)
{
    $value = AppletInstance::getValue($day);
    if (count($value) > 1) {
        if ($value[$key] == "true") {
            return "selected";
        }
    } elseif (count($value) == "true") {
        if ($value == 1) {
            return "selected";
        }
    } else {
        return "failed";
    }
}
$ci =& get_instance();
开发者ID:digvijay88,项目名称:OpenVBX-Plugin-Scheduling,代码行数:31,代码来源:ui.php


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