This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function ($) { | |
| /** | |
| * Register the myTheme behavior. | |
| */ | |
| Drupal.behaviors.myTheme = { | |
| attach: function (context, settings) { | |
| Drupal.myTheme.DatePicker(context, settings); | |
| } | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Implements hook_entity_query_alter(). | |
| */ | |
| function ibs_services_entity_query_alter($query) { | |
| // Don't allow commerce to clone new custom profiles. | |
| // Inspired by http://www.bywombats.com/blog/04-12-2013/bypassing-drupal-commerce-customer-profile-duplication. | |
| if (isset($query->tags['commerce_order_commerce_customer_profile_can_delete'])) { | |
| $query->propertyCondition('order_id', 1); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $form['#validate'] = array( | |
| 'user_login_name_validate', | |
| 'rules_forms_event_validate', | |
| 'example_login_final_validate', | |
| ); | |
| $form['#submit'][] = 'example_login_cart_convert'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Hide totals field. | |
| foreach (element_children($form['field_total_price']) as $key) { | |
| $form['field_total_price'][$key]['#access'] = FALSE; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $form['product_line_item_ref'] = array( | |
| '#type' => 'textfield', | |
| '#title' => t('Product Line Item Reference'), | |
| '#description' => t('Enter the product line item.'), | |
| // The last 4 URL parameters are important. | |
| // 4: Use <NULL> as a placeholder in the URL when we don't have an entity. | |
| // 3: Bundle, in our case the specific type of commerce line item but for node, that could page, etc. | |
| // 2: Entity type, commerce line item in our example but node is also a valid type. | |
| // 1: Field name that is the entityreference field. | |
| '#autocomplete_path' => 'entityreference/autocompelete/single/commerce_product_line_item_ref/commerce_line_item/related_lines/NULL', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @file | |
| * HTML Migration. | |
| */ | |
| abstract class PfizerProMigration extends Migration { | |
| public $baseDir; | |
| public $siteMapArray; | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * @file | |
| * HTML Migration. | |
| */ | |
| abstract class PfizerProMigration extends Migration { | |
| public $baseDir; | |
| public $siteMapArray; | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Create a taxonomy term and return the tid. | |
| */ | |
| function asg_estimate_create_taxonomy_term($name, $vid) { | |
| $term = new stdClass(); | |
| $term->name = $name; | |
| $term->vid = $vid; | |
| taxonomy_term_save($term); | |
| return $term->tid; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Removes group_2 content. | |
| */ | |
| function pfizer_pro_tikosyn_education_update_7001() { | |
| $query = db_select('url_alias', 'a') | |
| ->fields('a', array('source')) | |
| ->condition('alias', 'hcp/tikosyn_education%', 'LIKE'); | |
| $result = $query->execute()->fetchCol(); | |
| // The result set from url_alias includes 'node/123'. We need to remove node/. | |
| node_delete_multiple(array_map(function ($value) { return substr($value, 5); }, $result)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 31. Pushing /files to Acquia - only new or changed files, never deletes any file (as we might loose uploaded CMS content) | |
| sending incremental file list | |
| fixtures/tikosyn_education/lightbox/deering.html | |
| fixtures/tikosyn_education/lightbox/diamond-chf.html | |
| fixtures/tikosyn_education/lightbox/diamond-mi.html | |
| fixtures/tikosyn_education/lightbox/dosing.html | |
| fixtures/tikosyn_education/lightbox/efficacy.html | |
| fixtures/tikosyn_education/lightbox/ellenbogen.html | |
| fixtures/tikosyn_education/lightbox/moa.html |