forked from juhasz/drupal_sublime-snippets
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathh_entity_info.sublime-snippet
More file actions
37 lines (37 loc) · 917 Bytes
/
h_entity_info.sublime-snippet
File metadata and controls
37 lines (37 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<snippet>
<tabTrigger>h_entity_info</tabTrigger>
<content><![CDATA[/**
* Implements hook_entity_info().
*/
function ${TM_FILEPATH/.+(?:\/|\\)(?:themes|modules)(?:\/|\\)([a-zA-Z0-9_]+)(?:\/|\\).*/$1/}_entity_info() {
'${1}' => array(
'label' => t('${2}'),
'controller class' => '${3}',
'base table' => '${4}',
'revision table' => '${5}',
'uri callback' => '${6}',
'fieldable' => ${7},
'translation' => array(
'locale' => ${8},
),
'entity keys' => array(
'id' => '${9}',
'revision' => '${10}',
'bundle' => '${11}',
),
'bundle keys' => array(
'bundle' => '${12}',
),
'bundles' => array(),
'view modes' => array(
'${13}' => array(
'label' => t('${14}'),
'custom settings' => ${15},
),
),
),
);
return \$return;
}
]]></content>
</snippet>