woochica / drupal-mode Goto Github PK
View Code? Open in Web Editor NEWEmacs extension for developing Drupal modules
Emacs extension for developing Drupal modules
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.
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".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.