You are here

public static function ModuleUtils::debug in Node expire 7.2

Utility function to display debug info.

Display debug info and write it into log.

Parameters

object $data: Data to display.

File

src/Module/Utils/ModuleUtils.php, line 36
ModuleUtils class.

Class

ModuleUtils
ModuleUtils class.

Namespace

Drupal\node_expire\Module\Utils

Code

public static function debug($data = array()) {
  drupal_set_message(filter_xss_admin('<pre>' . print_r($data, TRUE) . '</pre>'));
  watchdog('node_expire', '<pre>' . print_r($data, TRUE) . '</pre>');
}