blob: 367ac6038b52f6d3aa9d40e559b8f697fe6d7c7b (
plain)
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
|
<?php
/**
* @file
* Contains welcome.module.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function clubs_form_alter(&$form, &$form_state, $form_id){
//print_r($form_id);
print_r($form['#view']);
if($form_id == 'node_page_form')
{
//print_r($form);
$form['actions']['submit']['#value'] = 'Update';
// $show= print_r($form,true);
// echo $show;
//echo '<pre>';
//echo '</pre>';
// echo '<pre>';
// var_dump($form);
// echo '</pre>';
}
if($form_id == 'system_site_information_settings')
{
// echo '<pre>';
// print_r($form);
// echo '</pre>';
$form['site_information']['site_name']['#default_value'] = 'L.D College Of Engineering';
$form['site_information']['site_mail']['#default_value'] = 'ldce-abad-dte@gujarat.gov.in';
}
}
function clubs_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the welcome module.
case 'help.page.clubs':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('this module shows welcome message to logged in user.') . '</p>';
return $output;
default:
}
}
/**
* Implements hook_theme().
*/
function clubs_theme() {
return [
'clubs' => [
'render element' => 'children',
],
];
}
|