Skip to content
This repository has been archived by the owner on May 2, 2018. It is now read-only.

Commit

Permalink
Merge pull request dingproject#10 from ding2tal/core-pr-5
Browse files Browse the repository at this point in the history
Core pr 5
  • Loading branch information
kasperg committed Oct 22, 2014
2 parents ab724d2 + e22dcd6 commit 837b39f
Show file tree
Hide file tree
Showing 11 changed files with 310 additions and 58 deletions.
82 changes: 82 additions & 0 deletions alma.features.field_base.inc
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,88 @@ function alma_field_default_field_bases() {
),
);

// Exported field_base: 'field_alma_sms'
$field_bases['field_alma_sms'] = array(
'active' => 1,
'cardinality' => 1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_alma_sms',
'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,
'profile2_private' => 0,
),
'storage' => array(
'active' => 1,
'module' => 'virtual_field',
'settings' => array(),
'type' => 'virtual_field',
),
'translatable' => 0,
'type' => 'text',
'virtual_field' => array(
'entity_types' => array(
0 => 'profile2',
),
),
);

// Exported field_base: 'field_alma_sms_id'
$field_bases['field_alma_sms_id'] = array(
'active' => 1,
'cardinality' => 1,
'deleted' => 0,
'entity_types' => array(),
'field_name' => 'field_alma_sms_id',
'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,
'profile2_private' => 0,
),
'storage' => array(
'active' => 1,
'module' => 'virtual_field',
'settings' => array(),
'type' => 'virtual_field',
),
'translatable' => 0,
'type' => 'text',
'virtual_field' => array(
'entity_types' => array(
0 => 'profile2',
),
),
);

// Exported field_base: 'field_alma_street_name'
$field_bases['field_alma_street_name'] = array(
'active' => 1,
Expand Down
84 changes: 75 additions & 9 deletions alma.features.field_instance.inc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function alma_field_default_field_instances() {
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 9,
'weight' => 10,
),
),
'entity_type' => 'profile2',
Expand All @@ -36,7 +36,7 @@ function alma_field_default_field_instances() {
'module' => 'virtual_field',
'settings' => array(),
'type' => 'hidden',
'weight' => 9,
'weight' => 10,
),
);

Expand Down Expand Up @@ -118,7 +118,7 @@ function alma_field_default_field_instances() {
'module' => 'list',
'settings' => array(),
'type' => 'list_default',
'weight' => 8,
'weight' => 9,
),
),
'entity_type' => 'profile2',
Expand Down Expand Up @@ -182,7 +182,7 @@ function alma_field_default_field_instances() {
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 5,
'weight' => 6,
),
),
'entity_type' => 'profile2',
Expand All @@ -200,7 +200,7 @@ function alma_field_default_field_instances() {
'size' => 12,
),
'type' => 'text_textfield',
'weight' => 8,
'weight' => 9,
),
);

Expand All @@ -215,7 +215,7 @@ function alma_field_default_field_instances() {
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 10,
'weight' => 11,
),
),
'entity_type' => 'profile2',
Expand All @@ -230,7 +230,7 @@ function alma_field_default_field_instances() {
'module' => 'virtual_field',
'settings' => array(),
'type' => 'hidden',
'weight' => 10,
'weight' => 12,
),
);

Expand Down Expand Up @@ -277,7 +277,7 @@ function alma_field_default_field_instances() {
'module' => 'list',
'settings' => array(),
'type' => 'list_default',
'weight' => 6,
'weight' => 7,
),
),
'entity_type' => 'profile2',
Expand Down Expand Up @@ -313,7 +313,7 @@ function alma_field_default_field_instances() {
'multiple_to' => '',
),
'type' => 'date_default',
'weight' => 7,
'weight' => 8,
),
),
'entity_type' => 'profile2',
Expand Down Expand Up @@ -345,6 +345,70 @@ function alma_field_default_field_instances() {
),
);

// Exported field_instance: 'profile2-provider_alma-field_alma_sms'
$field_instances['profile2-provider_alma-field_alma_sms'] = array(
'bundle' => 'provider_alma',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'label' => 'inline',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 5,
),
),
'entity_type' => 'profile2',
'field_name' => 'field_alma_sms',
'label' => 'SMS',
'required' => 0,
'settings' => array(
'text_processing' => 0,
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'text',
'settings' => array(
'size' => 60,
),
'type' => 'text_textfield',
'weight' => 8,
),
);

// Exported field_instance: 'profile2-provider_alma-field_alma_sms_id'
$field_instances['profile2-provider_alma-field_alma_sms_id'] = array(
'bundle' => 'provider_alma',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 12,
),
),
'entity_type' => 'profile2',
'field_name' => 'field_alma_sms_id',
'label' => 'SMS id',
'required' => 0,
'settings' => array(
'text_processing' => 0,
'user_register_form' => FALSE,
),
'widget' => array(
'module' => 'virtual_field',
'settings' => array(),
'type' => 'hidden',
'weight' => 11,
),
);

// Exported field_instance: 'profile2-provider_alma-field_alma_street_name'
$field_instances['profile2-provider_alma-field_alma_street_name'] = array(
'bundle' => 'provider_alma',
Expand Down Expand Up @@ -388,6 +452,8 @@ function alma_field_default_field_instances() {
t('Postal code');
t('Preferred branch');
t('Reservation pause');
t('SMS');
t('SMS id');
t('Set your reservations on pause.');
t('Street name');
t('The e-mail address is not made public and will only be used if you wish to receive certain news or notifications by e-mail.');
Expand Down
7 changes: 5 additions & 2 deletions alma.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name = Alma
description = Implementation of Axiell’s Alma API for DDELibra.
core = 7.x
package = Providers
php = 5.2.4
project = alma
dependencies[] = date
dependencies[] = ding_provider
Expand All @@ -16,7 +15,7 @@ dependencies[] = options
dependencies[] = profile2
dependencies[] = text
dependencies[] = virtual_field
features[features_api][] = api:1
features[features_api][] = api:2
features[field_base][] = field_alma_absent_id
features[field_base][] = field_alma_city
features[field_base][] = field_alma_full_name
Expand All @@ -27,6 +26,8 @@ features[field_base][] = field_alma_phone_id
features[field_base][] = field_alma_postal_code
features[field_base][] = field_alma_preferred_branch
features[field_base][] = field_alma_reservation_pause
features[field_base][] = field_alma_sms
features[field_base][] = field_alma_sms_id
features[field_base][] = field_alma_street_name
features[field_instance][] = profile2-provider_alma-field_alma_absent_id
features[field_instance][] = profile2-provider_alma-field_alma_city
Expand All @@ -38,6 +39,8 @@ features[field_instance][] = profile2-provider_alma-field_alma_phone_id
features[field_instance][] = profile2-provider_alma-field_alma_postal_code
features[field_instance][] = profile2-provider_alma-field_alma_preferred_branch
features[field_instance][] = profile2-provider_alma-field_alma_reservation_pause
features[field_instance][] = profile2-provider_alma-field_alma_sms
features[field_instance][] = profile2-provider_alma-field_alma_sms_id
features[field_instance][] = profile2-provider_alma-field_alma_street_name
features[profile2_type][] = provider_alma
files[] = alma.module
Expand Down
14 changes: 4 additions & 10 deletions alma.install
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?php
/**
* @file
* Handles requirements, installation and uninstall for the module.
*/

/**
* Implements hook_requirements().
Expand Down Expand Up @@ -27,16 +31,6 @@ function alma_requirements($phase) {
$requirements['alma']['description'] = $t('Alma is not properly configured, please visit <a href="@link">the settings page</a>.', array('@link' => url('admin/config/ding/provider/alma')));
$requirements['alma']['severity'] = REQUIREMENT_ERROR;
}
$requirements['alma_wayf'] = array(
'title' => $t('Alma WAYF'),
'value' => $t('Alma WAYF configured'),
'severity' => REQUIREMENT_OK,
);
if (!variable_get('wayf_hash', FALSE)) {
$requirements['alma']['value'] = $t('Alma WAYF not configured');
$requirements['alma']['description'] = $t('Alma WAYF is not properly configured, you need to set $conf[\'wayf_hash\'] in setttings.php.');
$requirements['alma']['severity'] = REQUIREMENT_ERROR;
}
}

return $requirements;
Expand Down
8 changes: 4 additions & 4 deletions alma.make
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ core = 7.x
; Contrib

projects[date][subdir] = "contrib"
projects[date][version] = "2.6"
projects[date][version] = "2.8"

projects[email][subdir] = "contrib"
projects[email][version] = "1.2"
projects[email][version] = "1.3"

projects[features][subdir] = "contrib"
projects[features][version] = "2.0-beta2"
projects[features][version] = "2.0"

projects[profile2][subdir] = "contrib"
projects[profile2][version] = "1.3"

projects[virtual_field][subdir] = "contrib"
projects[virtual_field][version] = "1.1"
projects[virtual_field][version] = "1.2"

; Ding! modules

Expand Down
Loading

0 comments on commit 837b39f

Please sign in to comment.