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
/** | |
* Computed field callback for calculating the highest review date of all | |
* field collection items on this profile. | |
* | |
* @param $entity_field | |
* @param $entity_type | |
* @param $entity | |
* @param $field | |
* @param $instance | |
* @param $langcode |
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 | |
/** | |
* Implements hook_date_formats(). | |
* | |
*/ | |
function my_module_date_formats() { | |
return array( | |
array( | |
'type' => 'my_module_year_only', | |
'format' => 'Y', |
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 hook_preprocess_entity(&$variables) { | |
if ($variables['content_element']->type == 'tour_item') { | |
$content_element_wrapper = entity_metadata_wrapper('content_element', $variables['content_element']); | |
$value = $content_element_wrapper->field_text_position->value(); | |
// Add some class to the tour item wrapper. Decide dependent on the value above. | |
$variables['classes_array'][] = 'text-left'; | |
} | |
} |
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
core = 7.x | |
api = 2 | |
projects[drupal][version] = "7.24" | |
; Modules | |
; ======= | |
projects[views][version] = 3.7 | |
projects[views][type] = "module" | |
projects[views][subdir] = "contrib" |