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


PHP dpm函数代码示例

本文整理汇总了PHP中dpm函数的典型用法代码示例。如果您正苦于以下问题:PHP dpm函数的具体用法?PHP dpm怎么用?PHP dpm使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: submitForm

 /**
  * {@inheritdoc}
  */
 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     ob_start();
     print eval($form_state['values']['code']);
     $_SESSION['devel_execute_code'] = $form_state['values']['code'];
     dpm(ob_get_clean());
 }
开发者ID:anatalsceo,项目名称:en-classe,代码行数:10,代码来源:ExecutePHP.php

示例2: submitForm

 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     dpm($form_state, '$form_state @ submitForm');
     //drupal_set_message(t('Your message is @message', array('@message' => $form_state->getValues()['message'])));
     //    $this->setConfigurationValue('fax_block_settings', $form_state->getValue('fax_block_settings'));
     $form_state->setRedirect('hello.hello_page');
 }
开发者ID:KenG01,项目名称:Achieve-D8,代码行数:7,代码来源:HelloForm.php

示例3: save

 function save(NewsMaterial $newsMaterial)
 {
     dpm($newsMaterial);
     foreach ($newsMaterial->content as $news_item) {
     }
     // TODO: Implement save() method.
 }
开发者ID:sosyuki,项目名称:wechat,代码行数:7,代码来源:NewsMaterialSave.php

示例4: save

 function save(FileMaterial $fileMaterial)
 {
     $wo = wechat_api_init_wechatobj();
     $file_content = $wo->getForeverMedia($fileMaterial->media_id);
     $file = file_save_data($file_content, 'public://' . $fileMaterial->name);
     dpm($file);
 }
开发者ID:sosyuki,项目名称:wechat,代码行数:7,代码来源:FileMaterialSave.php

示例5: updateProduct

 function updateProduct($data)
 {
     $url = "https://api.weixin.qq.com/scan/product/update?access_token={$this->access_token()}";
     $data = json_encode($data, JSON_UNESCAPED_UNICODE);
     dpm($data);
     return $this->request($url, 'POST', $data);
 }
开发者ID:sosyuki,项目名称:wechat,代码行数:7,代码来源:ScanController.php

示例6: getTaxonomyTermsAsSelectOptions

 /**
  * @param  \stdClass $config
  * @return array
  */
 protected function getTaxonomyTermsAsSelectOptions($config)
 {
     $answer = [];
     if (isset($config->vocabulary) && isset($config->level)) {
         /** @var \stdClass $vocabulary */
         if ($vocabulary = taxonomy_vocabulary_machine_name_load($config->vocabulary)) {
             $tree = $tree = taxonomy_get_tree($vocabulary->vid, 0, null, true);
             dpm($tree, "FLAT TREE");
             /*
             				if(count($terms) == 1) {
             					$term = array_pop($terms);
             					if(isset($term->description)) {
             						$answer = $term->description;
             						if($stripHtml) {
             							$answer = strip_tags($answer);
             						}
             					}
             				}*/
         } else {
             drupal_set_message("Vocabulary not found by name: " . $config->vocabulary, 'warning');
         }
     } else {
         drupal_set_message("Vocabulary or Level not set in config: " . json_encode($config), 'warning');
     }
     return $answer;
 }
开发者ID:adamjakab,项目名称:D7WebformEnhancer,代码行数:30,代码来源:WebformEnhancer.php

示例7: dbErrorMsg

function dbErrorMsg($msg)
{
    if (function_exists("dpm")) {
        dpm($msg, "DB Error");
    } else {
        print "ChapR ERP: \"{$msg}\"\n";
    }
}
开发者ID:ChapResearch,项目名称:CROMA,代码行数:8,代码来源:dbFunctions.php

示例8: submitForm

 /**
  * {@inheritdoc}
  */
 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     ob_start();
     $code = $form_state->getValue('code');
     print eval($code);
     $_SESSION['devel_execute_code'] = $code;
     dpm(ob_get_clean());
 }
开发者ID:ddrozdik,项目名称:dmaps,代码行数:11,代码来源:ExecutePHP.php

示例9: bootstrap_short_answer_user_answer

function bootstrap_short_answer_user_answer($variables)
{
    dpm($variables);
    dpm($node);
    $answer = $variables['answer'];
    $correct = $variables['correct'];
    $header = array(t('Correct Answer'), t('User Answer'));
    $row = array(array($correct, $answer));
    return theme('table', array('header' => $header, 'rows' => $row));
}
开发者ID:yvandouenel,项目名称:learn_quizz,代码行数:10,代码来源:template.php

示例10: dpm_once

/**
 * Quick function to dpm only one call from a loop etc.
 */
function dpm_once($input, $name = NULL, $type = 'status')
{
    $backtrace = debug_backtrace();
    $caller = array_shift($backtrace);
    $executed =& drupal_static(__FUNCTION__ . $caller['file'] . $caller['line'], FALSE);
    if (!$executed) {
        $executed = TRUE;
        if (function_exists('dpm')) {
            dpm($input, $name, $type);
        }
    }
}
开发者ID:Nerd-Collective,项目名称:Eventbox,代码行数:15,代码来源:template.php

示例11: watersportkampen_bootstrap_form_culturefeed_entry_ui_event_form_alter

function watersportkampen_bootstrap_form_culturefeed_entry_ui_event_form_alter(&$form, &$form_state, $event = NULL)
{
    $sports = _watersportkampen_bootstrap_get_sports();
    if (isset($form['#event'])) {
        $keywords = $form['#event']->getKeywords();
        $sports_default_value = array_intersect(array_map('strtolower', $keywords), array_map('strtolower', $sports));
        $sports_default_value = array_map('ucfirst', $sports_default_value);
        foreach ($sports_default_value as $sport_default_value) {
            try {
                $form['#event']->deleteKeyword(strtolower($sport_default_value));
            } catch (Exception $e) {
            }
            try {
                $form['#event']->deleteKeyword(ucfirst($sport_default_value));
            } catch (Exception $e) {
            }
        }
    }
    $form['basic']['title']['#weight'] = 1;
    $form['basic']['sports'] = array('#type' => 'checkboxes', '#title' => 'Sporten', '#options' => $sports, '#description' => 'Kies hier de sporten die voorkomen in uw sportkamp', '#weight' => 1, '#default_value' => isset($sports_default_value) ? $sports_default_value : array());
    $form['basic']['location']['#weight'] = 2;
    $form['basic']['when']['#weight'] = 3;
    unset($form['basic']['what']);
    unset($form['extra']['tags']);
    unset($form['extra']['old_tags']);
    if (isset($form['#event'])) {
        watersportkampen_bootstrap_form_culturefeed_entry_ui_tags_form_alter($form, $form_state, $form['#event']);
    } else {
        watersportkampen_bootstrap_form_culturefeed_entry_ui_tags_form_alter($form, $form_state);
    }
    $form['extra']['description']['#weight'] = 6;
    $form['extra']['tags']['#weight'] = 7;
    $form['extra']['old_tags']['#weight'] = 8;
    $form['extra']['links']['#weight'] = 9;
    $form['extra']['add_more_links']['#weight'] = 10;
    $form['extra']['add_more_links']['#limit_validation_errors'] = array();
    $form['extra']['photo']['#weight'] = 11;
    $form['extra']['price']['#weight'] = 12;
    $form['extra']['organiser']['#weight'] = 13;
    $form['extra']['age_category']['#weight'] = 14;
    $form['extra']['age']['#weight'] = 15;
    $form['extra']['fly']['#weight'] = 16;
    $form['extra']['vertical_tabs']['#weight'] = 17;
    dpm($form);
    unset($form['extra']['performers']);
    unset($form['extra']['language']);
    unset($form['extra']['entrance']);
    unset($form['extra']['translations']);
    unset($form['extra']['publication_date']);
    unset($form['submit']);
    $form['submit'] = array('#type' => 'submit', '#value' => t('Save'), '#validate' => array('watersportkampen_bootstrap_event_save_validate'));
}
开发者ID:janiek,项目名称:watersportkampen,代码行数:52,代码来源:template.php

示例12: debug_url

 function debug_url($return = FALSE)
 {
     if ($return) {
         return $this->build_url();
     }
     if (function_exists('dpm') && function_exists('krumo')) {
         dpm($this->build_url());
     } elseif (function_exists('krumo')) {
         krumo($this->build_url());
     } else {
         print '<pre>' . $this->build_url() . '</pre>';
     }
 }
开发者ID:gigikiri,项目名称:BingSearchAPI-1,代码行数:13,代码来源:class.BingSearch.php

示例13: mail

 /**
  * Overrides DefaultMailSystem::mail().
  *
  * Accepts an e-mail message and displays it on screen, and additionally logs
  * it to watchdog().
  */
 public function mail(array $message)
 {
     $header = "To: {$message['to']} <br />Subject: {$message['subject']}";
     $string = check_plain(print_r($message, TRUE));
     $string = '<pre>' . $string . '</pre>';
     if (module_exists('devel')) {
         dpm($message, $header);
     } else {
         drupal_set_message($header . ' ' . $string);
     }
     // Don't actually use debug to display the message since we want to be able
     // to categorize the watchdog type as 'mail' so it can be filterable in
     // UI.
     watchdog('mail', $header . ' ' . $string, NULL, WATCHDOG_INFO);
     return TRUE;
 }
开发者ID:juampynr,项目名称:DrupalCampEs,代码行数:22,代码来源:HelperDebugMailLog.php

示例14: _updateFields

/**
 * Update field
 */
function _updateFields($nid = NULL)
{
    $node = node_load($nid);
    if (isset($node->field_product_description['zh-hans'][0]['value'])) {
        dpm($node->nid . ' have CN');
    } else {
        if (isset($node->field_product_description['en'][0]['value'])) {
            $node->field_product_description['zh-hans'][0]['value'] = $node->field_product_description['en'][0]['value'];
            // It's good to call field_attach_presave()
            field_attach_presave('node', $node);
            field_attach_update('node', $node);
            dpm($node->nid . ' Update CN');
        } else {
            dpm($node->nid . ' No English');
        }
    }
}
开发者ID:temptemp5678,项目名称:onequote2,代码行数:20,代码来源:update_product_info.php

示例15: build

 /**
  * Implements \Drupal\Core\Block\BlockBase::blockBuild().
  */
 public function build()
 {
     //  case 'News':
     //      $blocks['subject'] = t('Photo\'s on News');
     //      $blocks['content'] = array(
     //        '#markup' => '<div id="News_images"> </div>',
     //        '#attached' => array(
     //          'js' => array(
     //            'data' => drupal_get_path('module', 'dd_tools') . '/js/News.js',
     //            array(
     //              'data' => array(
     //                'dd_tools' => array(
     //                  'block_items' => variable_get('News_items', 13),
     //                ),
     //              ),
     //              'type' => 'setting',
     //            ),
     //          ),
     //        ),
     //      );
     $query = db_select('node', 'n')->fields('n')->addTag('node_access')->range(0, $this->configuration['block_count']);
     $result = $query->execute();
     dpm($result);
     foreach ($result as $row) {
         dsm($row);
         var_dump($row);
     }
     $elements = array();
     if ($node_title_list = node_title_list($result)) {
         $elements['forum_list'] = $node_title_list;
         //      $elements['forum_more'] = array(
         //        '#type' => 'more_link',
         //        '#url' => Url::fromRoute('forum.index'),
         //        '#attributes' => array('title' => $this->t('Read the latest forum topics.')),
         //      );
     }
     $build = array();
     $build['elements']['#markup'] = $elements;
     $build['elements']['#markup'] = 'sdfsdafsd';
     $build['container']['#markup'] = '<div id="News_images">sdcsadvsdvsd </div>';
     //    $test = \Drupal::config('nognix.settings')->get('doh_you');
     //    $build['stuff2']['#markup'] = $this->configuration['content'];
     //    $build['#attached']['library'][] = 'dd_tools/News';
     $build['#attached']['library'][] = 'dd_tools/misc';
     return $build;
 }
开发者ID:batigolix,项目名称:doesdesign8,代码行数:49,代码来源:Dd_toolsNews.php


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