Snippet hook_menu and snippet h_menu are missing quotes around the 'file' value.

In the file bundle/vim-plugin-for-drupal/snippets/drupal7/php.snippets

snippet h_menu
	/**
	 * Implements hook_menu().
	 */
	function `Filename()`_menu() {
	  $items['${1}'] = array(
	    'title' => '${2}',
	    'page callback' => '${3}',
	    'page arguments' => array(${4}),
	    'access arguments' => array('${5}'),
	    'type' => ${6},
	    'file' => ${7},${8}
	  );
	
	  return $items;
	}

'file' should be

	    'file' => '${7}',${8}

And in bundle/vim-plugin-for-drupal/snippets/drupal/php.snippets

snippet hook_menu
	/**
	 * Implements hook_menu().
	 */
	function `Filename()`_menu() {
	  /*
	   *$items['blog'] = array(
	   *  'title' => 'blogs',
	   *  'page callback' => 'blog_page',
	   *  'access arguments' => array('access content'),
	   *  'type' => MENU_SUGGESTED_ITEM,
	   *);
	   */
	  $items['${1:path/to/register}'] = array(
	    'title' => '${2:Page title}',
	    'page callback' => '${3:callback_function}',
	    'page arguments' => array(${4}),
	    'access arguments' => array('${5:View published content}'),
	    'type' => ${6:MENU_NORMAL_ITEM}, // MENU_CALLBACK, MENU_LOCAL_TASK, MENU_DEFAULT_LOCAL_TASK, MENU_LOCAL_ACTION, MENU_SUGGESTED_ITEM,
	    // 'file' => ${7:`Filename()`.pages.inc},
	  );
	
	  return $items;
	}

'file' should be

	    // 'file' => '${7:`Filename()`.pages.inc}',
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vtcore created an issue. See original summary.

vtcore’s picture

Patch attached.

rodrigoaguilera’s picture

Status: Active » Fixed

Commited. Thanks!!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.