File tree 6 files changed +145
-0
lines changed
modules/custom/proba_blog
6 files changed +145
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * @file
4
+ * proba_blog.features.field_base.inc
5
+ */
6
+
7
+ /**
8
+ * Implements hook_field_default_field_bases().
9
+ */
10
+ function proba_blog_field_default_field_bases () {
11
+ $ field_bases = array ();
12
+
13
+ // Exported field_base: 'body'
14
+ $ field_bases ['body ' ] = array (
15
+ 'active ' => 1 ,
16
+ 'cardinality ' => 1 ,
17
+ 'deleted ' => 0 ,
18
+ 'entity_types ' => array (
19
+ 0 => 'node ' ,
20
+ ),
21
+ 'field_name ' => 'body ' ,
22
+ 'foreign keys ' => array (
23
+ 'format ' => array (
24
+ 'columns ' => array (
25
+ 'format ' => 'format ' ,
26
+ ),
27
+ 'table ' => 'filter_format ' ,
28
+ ),
29
+ ),
30
+ 'indexes ' => array (
31
+ 'format ' => array (
32
+ 0 => 'format ' ,
33
+ ),
34
+ ),
35
+ 'locked ' => 0 ,
36
+ 'module ' => 'text ' ,
37
+ 'settings ' => array (),
38
+ 'translatable ' => 0 ,
39
+ 'type ' => 'text_with_summary ' ,
40
+ );
41
+
42
+ return $ field_bases ;
43
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * @file
4
+ * proba_blog.features.field_instance.inc
5
+ */
6
+
7
+ /**
8
+ * Implements hook_field_default_field_instances().
9
+ */
10
+ function proba_blog_field_default_field_instances () {
11
+ $ field_instances = array ();
12
+
13
+ // Exported field_instance: 'node-blog-body'
14
+ $ field_instances ['node-blog-body ' ] = array (
15
+ 'bundle ' => 'blog ' ,
16
+ 'default_value ' => NULL ,
17
+ 'deleted ' => 0 ,
18
+ 'description ' => '' ,
19
+ 'display ' => array (
20
+ 'default ' => array (
21
+ 'label ' => 'hidden ' ,
22
+ 'module ' => 'text ' ,
23
+ 'settings ' => array (),
24
+ 'type ' => 'text_default ' ,
25
+ 'weight ' => 0 ,
26
+ ),
27
+ 'teaser ' => array (
28
+ 'label ' => 'hidden ' ,
29
+ 'module ' => 'text ' ,
30
+ 'settings ' => array (
31
+ 'trim_length ' => 600 ,
32
+ ),
33
+ 'type ' => 'text_summary_or_trimmed ' ,
34
+ 'weight ' => 0 ,
35
+ ),
36
+ ),
37
+ 'entity_type ' => 'node ' ,
38
+ 'field_name ' => 'body ' ,
39
+ 'label ' => 'Body ' ,
40
+ 'required ' => FALSE ,
41
+ 'settings ' => array (
42
+ 'display_summary ' => TRUE ,
43
+ 'text_processing ' => 1 ,
44
+ 'user_register_form ' => FALSE ,
45
+ ),
46
+ 'widget ' => array (
47
+ 'module ' => 'text ' ,
48
+ 'settings ' => array (
49
+ 'rows ' => 20 ,
50
+ 'summary_rows ' => 5 ,
51
+ ),
52
+ 'type ' => 'text_textarea_with_summary ' ,
53
+ 'weight ' => -4 ,
54
+ ),
55
+ );
56
+
57
+ // Translatables
58
+ // Included for use with string extractors like potx.
59
+ t ('Body ' );
60
+
61
+ return $ field_instances ;
62
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * @file
4
+ * proba_blog.features.inc
5
+ */
6
+
7
+ /**
8
+ * Implements hook_node_info().
9
+ */
10
+ function proba_blog_node_info () {
11
+ $ items = array (
12
+ 'blog ' => array (
13
+ 'name ' => t ('Blog ' ),
14
+ 'base ' => 'node_content ' ,
15
+ 'description ' => t ('Blog post ' ),
16
+ 'has_title ' => '1 ' ,
17
+ 'title_label ' => t ('Title ' ),
18
+ 'help ' => '' ,
19
+ ),
20
+ );
21
+ drupal_alter ('node_info ' , $ items );
22
+ return $ items ;
23
+ }
Original file line number Diff line number Diff line change
1
+ name = Proba Blog
2
+ core = 7.x
3
+ package = Features
4
+ dependencies[] = features
5
+ dependencies[] = text
6
+ features[features_api][] = api:2
7
+ features[field_base][] = body
8
+ features[field_instance][] = node-blog-body
9
+ features[node][] = blog
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * @file
4
+ * Code for the Proba Blog feature.
5
+ */
6
+
7
+ include_once 'proba_blog.features.inc';
Original file line number Diff line number Diff line change @@ -5,3 +5,4 @@ core = 7.x
5
5
dependencies[] = block
6
6
dependencies[] = dblog
7
7
dependencies[] = admin_menu
8
+ dependencies[] = proba_blog
You can’t perform that action at this time.
0 commit comments