本文整理汇总了PHP中ctools_export_ui::edit_form_submit方法的典型用法代码示例。如果您正苦于以下问题:PHP ctools_export_ui::edit_form_submit方法的具体用法?PHP ctools_export_ui::edit_form_submit怎么用?PHP ctools_export_ui::edit_form_submit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ctools_export_ui
的用法示例。
在下文中一共展示了ctools_export_ui::edit_form_submit方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
/**
* Handle the submission of the edit form.
*/
function edit_form_submit(&$form, &$form_state) {
parent::edit_form_submit($form, $form_state);
// Since items in our settings are not in the schema, we have to do these
// manually:
$form_state['item']->conf['disable_title'] = $form_state['values']['disable_title'];
}
示例2:
/**
* Update the form state "op" so we can properly redirect.
*/
function edit_form_submit(&$form, &$form_state)
{
parent::edit_form_submit($form, $form_state);
if ($form_state['triggering_element']['#parents'][0] == 'save_continue') {
$form_state['op'] = 'save_continue';
}
}
示例3:
function edit_form_submit(&$form, &$form_state)
{
parent::edit_form_submit($form, $form_state);
// Since items in our settings are not in the schema, we have to do these manually:
$form_state['item']->settings['placement'] = $form_state['values']['placement'];
$form_state['item']->settings['visibility'] = $form_state['values']['visibility'];
}
示例4: time
function edit_form_submit(&$form, &$form_state)
{
$form_state["values"]['changed'] = time();
parent::edit_form_submit($form, $form_state);
$template_code = $form_state["values"]['html'];
$item = $form_state['item'];
zm_template_save_template($template_code, $item->name);
}
示例5:
/**
* Prepare the tag values before they are added to the database.
*/
function edit_form_submit(&$form, &$form_state)
{
// Since the targeting form is reusable it isn't already in the settings
// array so we grab it here.
$form_state['values']['settings']['targeting'] = $form_state['values']['targeting'];
$form_state['values']['settings']['breakpoints'] = $form_state['values']['breakpoints'];
parent::edit_form_submit($form, $form_state);
}
示例6: serialize
/**
* Prepare the tag values before they are added to the database.
*/
function edit_form_submit(&$form, &$form_state)
{
$settings = $form_state['values']['settings'];
// Since the targeting form is reusable it isn't already in the settings
// array so we grab it here.
$settings['targeting'] = $form_state['values']['targeting'];
$form_state['values']['settings'] = serialize($settings);
parent::edit_form_submit($form, $form_state);
}
示例7:
function edit_form_submit(&$form, &$form_state)
{
parent::edit_form_submit($form, $form_state);
// Since items in our settings are not in the schema, we have to do these manually:
$form_state['item']->settings['title'] = $form_state['values']['title'];
$form_state['item']->settings['body'] = $form_state['values']['body']['value'];
$form_state['item']->settings['format'] = $form_state['values']['body']['format'];
$form_state['item']->settings['substitute'] = $form_state['values']['substitute'];
}
示例8: array
function edit_form_submit(&$form, &$form_state)
{
parent::edit_form_submit($form, $form_state);
if (module_exists('mailhandler_default')) {
drupal_set_message(t("Now that you've created a mailbox, send it a test email and try to <a href='@import-page'>create a source node</a> to start importing messages.", array('@import-page' => url('node/add/mailhandler-source'))));
} else {
drupal_set_message(t("Now that you've created a mailbox, you'll need to <a href='@importer-add'>create a Feeds importer</a> or <a href='@import-page'>run an existing importer</a>. Consider <a href='@module-page'>enabling the Mailhandler quick-start</a> module.", array('@importer-add' => url(MAILHANDLER_MENU_PREFIX . '/feeds/add'), '@import-page' => url('import'), '@module-page' => url('admin/modules'))));
}
}
示例9: substr
function edit_form_submit($form, &$form_state) {
parent::edit_form_submit($form, $form_state);
$type = substr($form_state['values']['service_charge'], -1) == '%' ? 'percentage' : 'price';
$amount = str_replace(array('%', '='), '', $form_state['values']['service_charge']);
$form_state['item']->data = array(
'service_charge' => trim($amount),
'service_charge_type' => $type,
'service_charge_title' => $form_state['values']['service_charge_title'],
);
}
示例10:
/**
* Handle the submission of the edit form.
*
* At this point, submission is successful. Our only responsibility is
* to copy anything out of values onto the item that we are able to edit.
*
* If the keys all match up to the schema, this method will not need to be
* overridden.
*/
function edit_form_submit(&$form, &$form_state)
{
parent::edit_form_submit($form, $form_state);
if (isset($form_state['values']['attachToMap'])) {
$form_state['item']->attachToMap = $form_state['values']['attachToMap'];
}
if (isset($form_state['values']['attachToLayer'])) {
$form_state['item']->attachToLayer = $form_state['values']['attachToLayer'];
}
}
示例11: array
/**
* Handle the submission of the edit form.
*/
function edit_form_submit(&$form, &$form_state)
{
// Update old help with new help string.
if (function_exists('i18n_string_update')) {
$name = $this->_create_string_key($form_state['item']->name, 'help');
$options = array('format' => I18N_STRING_FILTER_XSS_ADMIN, 'messages' => FALSE);
i18n_string_update($name, $form_state['item']->help, $options);
}
if (empty($form_state['item']->weight)) {
$form_state['values']['weight'] = '-50';
}
$this->_reformat_roles($form, $form_state);
$form_state['values']['options'] = serialize($form_state['values']['options']);
parent::edit_form_submit($form, $form_state);
}
示例12: foreach
/**
* Prepare the tag values before they are added to the database.
*/
function edit_form_submit(&$form, &$form_state)
{
$style_data = $form_state['values']['style_data'];
// Cast and unset values so JS can handle them better,
// Unless values are in the form ${attribute}
foreach ($form_state['values']['data'] as $key => $value) {
if ($form_state['values']['data'][$key] === '') {
unset($form_state['values']['data'][$key]);
} elseif (isset($style_data[$key]['type']) && strpos($form_state['values']['data'][$key], '${') !== 0) {
if ($style_data[$key]['type'] == 'integer') {
$form_state['values']['data'][$key] = (int) $form_state['values']['data'][$key];
} elseif ($style_data[$key]['type'] == 'float') {
$form_state['values']['data'][$key] = (double) $form_state['values']['data'][$key];
}
}
}
parent::edit_form_submit($form, $form_state);
}
示例13:
function edit_form_submit(&$form, &$form_state)
{
parent::edit_form_submit($form, $form_state);
// Invoke submission handler from display-edit.inc. Might invoke submission
// logic from a layout plugin.
panels_edit_display_settings_form_submit($form, $form_state);
$form_state['item']->settings = $form_state['display']->layout_settings;
}
示例14:
function edit_form_submit(&$form, &$form_state) {
parent::edit_form_submit($form, $form_state);
$form_state['item']->category = $form_state['values']['category'];
}
示例15:
/**
* Prepare the tag values before they are added to the database.
*/
function edit_form_submit(&$form, &$form_state)
{
$layer = openlayers_layer_type_load($form_state['values']['data']['layer_type']);
$layer->options_form_submit($form, $form_state);
parent::edit_form_submit($form, $form_state);
}