Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
wcms-openscholar
uw_virtual_site_homepage
Commits
3b7b26ee
Commit
3b7b26ee
authored
Nov 23, 2016
by
Eric Bremner
Browse files
FDSU-1841: Fixing more logic and comments.
parent
6bb9c1da
Changes
1
Hide whitespace changes
Inline
Side-by-side
uw_virtual_site_homepage.install
View file @
3b7b26ee
<?php
/*
* Implements hook_update_dependencies().
* Setting the order of update hooks so that uw_virtual_site_homepage_update_7100 runs first.
*/
function
uw_virtual_site_homepage_update_dependencies
()
{
// Indicate that the uw_virtual_site_homepage_update_700
1
() function provided by this module
// Indicate that the uw_virtual_site_homepage_update_7
1
00() function provided by this module
// must run before the one of the os_profiles_update_N() function provided by the 'os_profiles' module.
$dependencies
[
'os_profiles'
][
7045
]
=
array
(
...
...
@@ -26,6 +30,7 @@ function uw_virtual_site_homepage_update_dependencies() {
}
/**
* Implements hook_update_N().
* Changing Office Hours field name and instance for virtual homepages.
*/
function
uw_virtual_site_homepage_update_7100
()
{
...
...
@@ -192,9 +197,10 @@ function uw_virtual_site_homepage_update_7100() {
/**
* Helper function to get the new field information
*/
function
_get_new_field
(
$new_name
)
{
if
(
$new_name
==
"field_uw_email_homepage"
)
{
$new_field
=
array
(
function
_get_new_field
(
$name
)
{
switch
(
$name
)
{
case
"field_uw_email_homepage"
:
$new_field
=
array
(
'active'
=>
1
,
'cardinality'
=>
1
,
'deleted'
=>
0
,
...
...
@@ -221,10 +227,42 @@ function _get_new_field($new_name) {
'translatable'
=>
0
,
'type'
=>
'text'
,
);
}
if
(
$new_name
==
"field_uw_extension"
)
{
$new_field
=
array
(
return
$new_field
;
case
"field_uw_email_homepage"
:
$new_field
=
array
(
'active'
=>
1
,
'cardinality'
=>
1
,
'deleted'
=>
0
,
'entity_types'
=>
array
(),
'field_name'
=>
'field_uw_email_homepage'
,
'foreign keys'
=>
array
(
'format'
=>
array
(
'columns'
=>
array
(
'format'
=>
'format'
,
),
'table'
=>
'filter_format'
,
),
),
'indexes'
=>
array
(
'format'
=>
array
(
0
=>
'format'
,
),
),
'locked'
=>
0
,
'module'
=>
'text'
,
'settings'
=>
array
(
'max_length'
=>
255
,
),
'translatable'
=>
0
,
'type'
=>
'text'
,
);
return
$new_field
;
case
"field_uw_extension"
:
$new_field
=
array
(
'active'
=>
1
,
'cardinality'
=>
1
,
'deleted'
=>
0
,
...
...
@@ -251,10 +289,11 @@ function _get_new_field($new_name) {
'translatable'
=>
0
,
'type'
=>
'text'
,
);
}
if
(
$new_name
==
"field_uw_faculty"
)
{
$new_field
=
array
(
return
$new_field
;
case
"field_uw_faculty"
:
$new_field
=
array
(
'active'
=>
1
,
'cardinality'
=>
1
,
'deleted'
=>
0
,
...
...
@@ -281,10 +320,11 @@ function _get_new_field($new_name) {
'translatable'
=>
0
,
'type'
=>
'text'
,
);
}
if
(
$new_name
==
"field_uw_office_hours"
)
{
$new_field
=
array
(
return
$new_field
;
case
"field_uw_office_hours"
:
$new_field
=
array
(
'active'
=>
1
,
'cardinality'
=>
1
,
'deleted'
=>
0
,
...
...
@@ -309,10 +349,11 @@ function _get_new_field($new_name) {
'translatable'
=>
0
,
'type'
=>
'text_long'
,
);
}
if
(
$new_name
==
"field_uw_office_location"
)
{
$new_field
=
array
(
return
$new_field
;
case
"field_uw_office_location"
:
$new_field
=
array
(
'active'
=>
1
,
'cardinality'
=>
1
,
'deleted'
=>
0
,
...
...
@@ -339,10 +380,11 @@ function _get_new_field($new_name) {
'translatable'
=>
0
,
'type'
=>
'text'
,
);
}
if
(
$new_name
==
"field_uw_phone_number"
)
{
$new_field
=
array
(
return
$new_field
;
case
"field_uw_phone_number"
:
$new_field
=
array
(
'active'
=>
1
,
'cardinality'
=>
1
,
'deleted'
=>
0
,
...
...
@@ -369,10 +411,11 @@ function _get_new_field($new_name) {
'translatable'
=>
0
,
'type'
=>
'text'
,
);
}
if
(
$new_name
==
"field_uw_profile_image"
)
{
$new_field
=
array
(
return
$new_field
;
case
"field_uw_profile_image"
:
$new_field
=
array
(
'active'
=>
1
,
'cardinality'
=>
1
,
'deleted'
=>
0
,
...
...
@@ -400,10 +443,11 @@ function _get_new_field($new_name) {
'translatable'
=>
0
,
'type'
=>
'image'
,
);
}
if
(
$new_name
==
"field_uw_site_description"
)
{
$new_field
=
array
(
return
$new_field
;
case
"field_uw_site_description"
:
$new_field
=
array
(
'active'
=>
1
,
'cardinality'
=>
1
,
'deleted'
=>
0
,
...
...
@@ -430,7 +474,7 @@ function _get_new_field($new_name) {
'translatable'
=>
0
,
'type'
=>
'text_with_summary'
,
);
}
return
$new_field
;
return
$new_field
;
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment