Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function issueTracker_init() {
- // drupal_set_message(t('hell, jars'));
- }
- function issueTracker_menu() {
- $items = array();
- $items['issueTracker/custom'] = array(
- 'title' => 'New issue',
- 'description' => "Create new issue",
- 'page callback' => 'drupal_get_form',
- 'access arguments' => array('access content'),
- 'page arguments' => array('issueTracker_form'),
- 'access callback' => TRUE
- );
- return $items;
- }
- function issueTracker_permission() {
- return array(
- 'custom path' => array(
- 'title' => t('Access the custom path'),
- 'description' => t('Allow users access to the custom path'),
- ),
- );
- }
- function issueTracker_help($path, $arg) {
- switch ($path) {
- case 'admin/help#issueTracker':
- return '<p>' . t('Form to capture user issues') . '</p>';
- break;
- }
- }
- function issueTracker_block_info(){
- $blocks['current issues'] = array(
- 'info' => t('Current issues'),
- 'cache' => DRUPAL_CACHE_PER_ROLE,
- );
- return $blocks;
- }
- function issueTracker_form($form, &$form_state) {
- $form['issueDescription'] = array(
- '#type' => 'textfield',
- '#title' => t('Issue Description'),
- '#size' => 255,
- '#maxlength' => 255,
- '#required' => TRUE,
- );
- $form['submit_button'] = array(
- '#type' => 'submit',
- '#value' => t('Click here'),
- );
- return $form;
- }
- function issueTracker_form_validate($form, &$form_state) {
- }
- function issueTracker_form_submit($form, &$form_state) {
- }
- function issueTracker_helper() {
- return '<p>Hell, jello</p>';
- }
- function issueTracker_schema() {
- $schema = array();
- $schema['domIssues'] = array(
- // Example (partial) specification for table "node".
- 'description' => 'Tracking issues.',
- 'fields' => array(
- 'issueID' => array(
- 'description' => 'The primary identifier for an issue.',
- 'type' => 'serial',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- ),
- 'issueDate' => array(
- 'description' => 'Date issue created.',
- 'mysql_type' => 'DATETIME',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- ),
- 'issueDescription' => array(
- 'description' => 'Issue details.',
- 'type' => 'varchar',
- 'length' => 255,
- 'not null' => TRUE,
- 'default' => '',
- ),
- 'lastModified' => array(
- 'description' => 'Issue last touched.',
- 'mysql_type' => 'DATETIME',
- 'not null' => TRUE,
- ),
- ),
- // 'indexes' => array(
- // 'issue_changed' => array('changed'),
- // 'issue_created' => array('created'),
- // ),
- // 'unique keys' => array(
- // 'nid_vid' => array('nid', 'vid'),
- // 'vid' => array('vid'),
- // ),
- // 'foreign keys' => array(
- // 'node_revision' => array(
- // 'table' => 'node_revision',
- // 'columns' => array('vid' => 'vid'),
- // ),
- // 'issue_author' => array(
- // 'table' => 'users',
- // 'columns' => array('uid' => 'uid'),
- // // ),
- // ),
- 'primary key' => array('issueID'),
- );
- return $schema;
- }
- Drupal version : 7.32
- Site URI : http://default
- Database driver : mysql
- Database username : dbo
- Database name : db
- Database : Connected
- Drupal bootstrap : Successful
- Drupal user : Anonymous
- Default theme : velocity
- Administration theme : seven
- PHP executable : /home/sam/.phpbrew/php/php-5.4.34/bin/php
- PHP configuration : /home/sam/.phpbrew/php/php-5.4.34/etc/php.i
- ni
- PHP OS : Linux
- Drush version : 6.2.0
- Drush configuration :
- Drush alias files :
- Drupal root : /media/psf/Home/apps/umhef
- Site path : sites/default
- File directory path : sites/default/files
- Temporary file directory path : sites/default/files/tmp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement