本文整理汇总了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();
}
示例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();
示例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();
示例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();