Code Monkey home page Code Monkey logo

drupal-mode's People

Contributors

woochica avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

drupal-mode's Issues

First comments and function indenting not correct

I must be missing something obvious - but the initial indenting I'm getting is:

<?php
  /**
   * @file
   * This module can export and import datasets.
   *
   * It will have several clearly defined sections and will be
   * extended by plugins or include files.
   *
   * The sections are:
   * Help
   * Permissions
   * hook_menu
   * calbacks
   * forms
   * submit
   * validation
   */

  /**
   * Display help and module information
   *
   * @Param string $path
   * Path which path of the site we're displaying help.
   * @Param array $arg
   * Arg array that holds the current path as would be returned from
   * arg() function.
   *
   * @Return string
   * Help text for the path.
   */
function data_export_import_help($path, $arg) {

  $output = '';

  switch ($path) {
  case "admin/help#data_export_import":
    $output = '

' . t("Exports datasets as files which can then imported into other Drupal instances.") . '

';
    break;
  }
  return $output;
  }

where the comment blocks are indented unnecessarily and the closing bracket of the first function declaration is not at the beginning of the line - but they are in the following function declarations.

And BTW - thanks for this mode which helps out greatly with array formatting.

drupal-hook-implement not quite right

Run drupal-hook-implement and pass it hook_menu. It will insert several functions, none of which is hook_menu(). It seems to grab code from the comments on http://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_menu/7, rather than the example implementation.

I wonder would it be better to grab hook code from system.api.php? Or from modules/examples? If it looked for files in the local drupal tree, it might more easily support Drupal 6.x, 7.x and 8.x at the same time.

When I first used drupal-hook-implement, I was typing "menu" at the prompt. Took me a while to realize it needed "hook_menu".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.