<?php

/**
 * @file
 * Primary module hooks for {{ name }} module.
 */

/**
 * Implements hook_init().
 */
function {{ machine_name }}_init() {
  drupal_set_message('It works!');
}

/**
 * Implements hook_menu().
 */
function {{ machine_name }}_menu() {

   $items['{{ machine_name }}'] = array(
    'title' => '{{ machine_name }}',
    'description' => '{{ machine_name }} main page.',
    'page callback' => '{{ machine_name }}_main_page',
    'page arguments' => array('{{ machine_name }}_settings_form'),
    'access arguments' => array('view {{ machine_name }} page'),
    'file' => '{{ machine_name }}.pages.inc',
    'type' => MENU_CALLBACK,
  );

  $items['admin/config/system/{{ machine_name }}'] = array(
    'title' => '{{ name }}',
    'description' => '{{ name }} settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('{{ machine_name }}_settings_form'),
    'access arguments' => array('administer {{ machine_name }} configuration'),
    'file' => '{{ machine_name }}.admin.inc',
  );

  return $items;
}

/**
 * Implements hook_permission().
 */
function {{ machine_name }}_permission() {
  return array(
    'view {{ machine_name }} page' => array(
      'title' => t('View {{ machine_name }} page'),
      'description' => t('View {{ machine_name }} page.'),
    ),
    'administer {{ machine_name }} configuration' => array(
      'title' => t('Administer {{ machine_name }} configuration'),
      'description' => t('Administer {{ machine_name }} configuration.'),
      'restrict access' => TRUE,
    ),
  );
}
