You are here

function log_add in Log entity 7

Add new log page callback.

Parameters

string $type: The log type.

Return value

array Returns the log form array.

1 string reference to 'log_add'
log_menu in ./log.module
Implements hook_menu().

File

./log.pages.inc, line 78
Log pages.

Code

function log_add($type) {
  $log_type = log_types($type);
  $log = entity_create('log', array(
    'type' => $type,
  ));
  drupal_set_title(t('Log @name', array(
    '@name' => entity_label('log_type', $log_type),
  )));
  $output = drupal_get_form('log_form', $log);
  return $output;
}