Created
January 27, 2011 23:02
-
-
Save cyberswat/799489 to your computer and use it in GitHub Desktop.
_complex_widget_installed_instances()
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 | |
/** | |
* Return a structured array defining the instances for this content type. | |
* | |
* This is provided as a function so that it can be used in both hook_install() | |
* and hook_uninstall(). | |
*/ | |
function _complex_widget_installed_instances() { | |
$types = array(t('number'), t('string')); | |
return array( | |
'source_variable' => array( | |
'field_name' => 'source_variable', | |
'label' => t('Variables'), | |
'widget' => array( | |
'type' => 'source_variable', | |
'settings' => array( | |
'summary_rows' => 2, | |
'types' => implode('|', $types), | |
), | |
'weight' => -4, | |
'module' => 'source', | |
), | |
'settings' => array('display_summary' => FALSE), | |
'display' => array( | |
'default' => array( | |
'label' => 'hidden', | |
'type' => 'source_default', | |
), | |
'teaser' => array( | |
'label' => 'hidden', | |
'type' => 'source_default', | |
), | |
), | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment