forked from ec-europa/nexteuropa-newsroom-reference
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nexteuropa_newsroom.menu.inc
94 lines (91 loc) · 3.19 KB
/
nexteuropa_newsroom.menu.inc
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
/**
* @file
* Code for the nexteuropa newsroom menu hooks.
*/
/**
* Implements hook_menu().
*/
function nexteuropa_newsroom_menu() {
// Configuration page.
$items['admin/config/content/newsroom'] = [
'title' => 'Newsroom',
'description' => 'Configure Newsroom settings',
'page callback' => 'drupal_get_form',
'page arguments' => ['nexteuropa_newsroom_admin_settings'],
'access arguments' => [NEXTEUROPA_NEWSROOM_ADMIN_ACCESS],
'file' => 'nexteuropa_newsroom.admin.inc',
];
$items['admin/config/content/newsroom/delete'] = [
'title' => 'Delete existing items',
'description' => 'Delete items imported by Newsroom connector.',
'page callback' => 'drupal_get_form',
'page arguments' => array('_nexteuropa_newsroom_delete_items_confirm'),
'access arguments' => [NEXTEUROPA_NEWSROOM_ADMIN_ACCESS],
'file' => 'nexteuropa_newsroom.admin.inc',
];
$items['news-redirect'] = [
'title' => 'Newsroom Item Redirect',
'page callback' => '_nexteuropa_newsroom_item_redirect',
'access arguments' => ['access content'],
'type' => MENU_CALLBACK,
];
$items['news-proposal'] = [
'title' => 'Newsroom item proposal',
'page callback' => 'drupal_get_form',
'page arguments' => ['nexteuropa_newsroom_proposal_form'],
'access arguments' => [NEXTEUROPA_NEWSROOM_PROPOSAL_ACCESS],
];
$items['newsroom-agenda'] = [
'title' => 'Newsroom Agenda',
'description' => 'Displays Newsroom items as Agenda',
'page callback' => '_nexteuropa_newsroom_agenda',
'access arguments' => ['access content'],
'type' => MENU_CALLBACK,
'file' => 'nexteuropa_newsroom.pages.inc',
];
$items['newsletters'] = [
'title' => 'Newsletters',
'description' => 'Newsletters service list',
'page callback' => '_nexteuropa_newsroom_newsletters_page',
'access arguments' => ['access content'],
'type' => MENU_CALLBACK,
'file' => 'nexteuropa_newsroom.pages.inc',
];
$items['newsroom-redirect/%/%'] = [
'title' => 'Newsroom item redirect',
'page callback' => '_nexteuropa_newsroom_redirect',
'page arguments' => [1, 2],
'access arguments' => ['access content'],
'type' => MENU_CALLBACK,
];
$items['newsroom-import/%/%'] = [
'title' => 'Newsroom item import',
'page callback' => '_nexteuropa_newsroom_import_item',
'page arguments' => [1, 2],
'access callback' => '_nexteuropa_newsroom_item_import_access',
'type' => MENU_CALLBACK,
];
$items['newsroom-delete/%/%'] = [
'title' => 'Newsroom item delete',
'page callback' => '_nexteuropa_newsroom_delete_item',
'page arguments' => [1, 2],
'access callback' => '_nexteuropa_newsroom_item_import_access',
'type' => MENU_CALLBACK,
];
$items['newsroom'] = [
'page callback' => '_nexteuropa_newsroom_page',
'access arguments' => ['access content'],
'type' => MENU_CALLBACK,
'file' => 'nexteuropa_newsroom.pages.inc',
];
$items['newsroom-rss'] = [
'title' => 'Newsroom RSS feed',
'description' => 'Newsroom RSS feed',
'page callback' => '_nexteuropa_newsroom_rss',
'access arguments' => ['access content'],
'type' => MENU_CALLBACK,
'file' => 'nexteuropa_newsroom.pages.inc',
];
return $items;
}