You are here

function patterns_utils_generate_info_section in Patterns 7.2

Same name and namespace in other branches
  1. 7 includes/utils.inc \patterns_utils_generate_info_section()

File

includes/utils.inc, line 101
Collectiion of general purpose functions.

Code

function patterns_utils_generate_info_section($title = 'Untitled Pattern', $category = 'General', $descr = 'No description', $v = '1.0', $core = 'x.y', $user = NULL, $base_root = NULL) {
  if (is_null($user)) {
    global $user;
  }
  if (is_null($base_root)) {
    global $base_root;
  }
  $info = array(
    'info' => array(),
  );
  $info['info']['title'] = $title;
  $info['info']['author'] = $user->name;
  $info['info']['category'] = $category;
  $info['info']['description'] = $descr;
  $info['info']['core'] = $core;
  $info['info']['author'] = $user->name;
  $info['info']['author_email'] = $user->mail;
  $info['info']['author_website'] = $base_root;
  return $info;
}