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( |
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 fields created by this content type. | |
* | |
* This is packaged in a function so it can be used in both | |
* node_example_install() and node_example_uninstall(). | |
*/ | |
function _complex_widget_installed_fields() { | |
return array( | |
'complex_widget_variable' => array( |
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_install(). | |
*/ | |
function complex_widget_install() { | |
// Create the content type using node_content as the base. | |
$t = get_t(); | |
$node_type = array( | |
'type' => 'my_node_type', | |
'name' => $t('Complex widget example'), |
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
; $Id$ | |
name = complex widget | |
description = Example content type with a complex widget. | |
package = examples | |
core = 7.x | |
files[] = complex_widget.install | |
files[] = complex_widget.module |
NewerOlder