Search for example

Files

NameLocationDescription
developer/examples/block_example.infodeveloper/examples/block_example.infoname = Block Example description = An example outlining how a module can define blocks. package = Example modules
developer/examples/block_example.moduledeveloper/examples/block_example.moduleThis is an example outlining how a module can define blocks to be displayed on each page.
developer/examples/example_element.infodeveloper/examples/example_element.infoname = Element Example description = An example demonstrating how a module can define custom form elements. package = Example modules
developer/examples/example_element.moduledeveloper/examples/example_element.moduleThis is an example demonstrating how a module can define custom form elements.
developer/examples/filter_example.infodeveloper/examples/filter_example.infoname = Filter Example description = An example module showing how to define a custom filter. package = Example modules
developer/examples/filter_example.moduledeveloper/examples/filter_example.moduleThis is an example outlining how a module can be used to define a filter to be run on user-submitted content before it is output to the browser.
developer/examples/multipage_form_example.moduledeveloper/examples/multipage_form_example.module
developer/examples/nodeapi_example.infodeveloper/examples/nodeapi_example.infoname = NodeAPI Example description = An example module showing how to extend existing content types. package = Example modules
developer/examples/nodeapi_example.installdeveloper/examples/nodeapi_example.install
developer/examples/nodeapi_example.moduledeveloper/examples/nodeapi_example.moduleThis is an example outlining how a module can be used to extend existing content types.
developer/examples/node_access_example.infodeveloper/examples/node_access_example.infoname = Node Access Example description = An example module showing node access control. package = Example modules
developer/examples/node_access_example.installdeveloper/examples/node_access_example.install
developer/examples/node_access_example.moduledeveloper/examples/node_access_example.moduleThis is an example illustrating how to restrict access to nodes based on some criterion associated with the user.
developer/examples/node_example.infodeveloper/examples/node_example.infoname = Node Example description = An example module showing how define a custom content type. package = Example modules
developer/examples/node_example.installdeveloper/examples/node_example.install
developer/examples/node_example.moduledeveloper/examples/node_example.moduleThis is an example outlining how a module can be used to define a new node type.
developer/examples/page_example.infodeveloper/examples/page_example.infoname = Page Example description = An example module showing how to define a page to be displayed to the user at a given URL. package = Example modules
developer/examples/page_example.moduledeveloper/examples/page_example.moduleThis is an example outlining how a module can be used to display a custom page at a given URL.
developer/examples/xmlrpc_example.infodeveloper/examples/xmlrpc_example.infoname = XMLRPC Example description = This is an example of how to implement XML-RPC callbacks by implementing a validation suite. package = Example modules
developer/examples/xmlrpc_example.moduledeveloper/examples/xmlrpc_example.moduleThis is an example of how to implement XML-RPC callbacks by implementing a validation suite.

Functions & methods

NameLocationDescription
block_example_blockdeveloper/examples/block_example.moduleImplementation of hook_block().
block_example_contentsdeveloper/examples/block_example.moduleA block content function.
example_element_demodeveloper/examples/example_element.moduleThis is a simple form to demonstrate how to use the phonenumber form element we defined.
example_element_elementsdeveloper/examples/example_element.moduleImplementation of hook_elements().
example_element_expanddeveloper/examples/example_element.moduleOur process callback to expand the control.
example_element_menudeveloper/examples/example_element.moduleImplementation of hook_menu().
example_element_validatedeveloper/examples/example_element.moduleOur element's validation function.
filter_example_filterdeveloper/examples/filter_example.moduleImplementation of hook_filter().
filter_example_filter_tipsdeveloper/examples/filter_example.moduleImplementation of hook_filter_tips().
multipage_form_example_accessdeveloper/examples/multipage_form_example.moduleImplementation of hook_access().
multipage_form_example_custom_submitdeveloper/examples/multipage_form_example.module
multipage_form_example_custom_validatedeveloper/examples/multipage_form_example.moduleValidate our form.
multipage_form_example_deletedeveloper/examples/multipage_form_example.moduleImplementation of hook_delete().
multipage_form_example_elementsdeveloper/examples/multipage_form_example.modulePlaying around here with a new form element to enable storing hidden values in an array fashion. Seems to work fine. Check out $form['test_hidden_array'] above for how to structure the form element
multipage_form_example_formdeveloper/examples/multipage_form_example.moduleImplementation of hook_form() for multipage_form_example. We don't set ANY #required attributes here - we leave that up to multipage_form_example_pre_render().
multipage_form_example_form_alterdeveloper/examples/multipage_form_example.moduleImplementation of hook_form_alter(). Here, we set up the 'page' field, which keeps track of what stage the form is in.
multipage_form_example_helpdeveloper/examples/multipage_form_example.moduleImplementation of hook_help().
multipage_form_example_loaddeveloper/examples/multipage_form_example.moduleImplementation of hook_load().
multipage_form_example_menudeveloper/examples/multipage_form_example.moduleImplementation of hook_menu().
multipage_form_example_node_infodeveloper/examples/multipage_form_example.moduleImplementation of hook_node_info().
multipage_form_example_pre_renderdeveloper/examples/multipage_form_example.moduleThe #pre_render of a form allows us to make changes AFTER validation (unlike hook_form_alter()), but BEFORE the form has actually been displayed. We use it to control which form elements are shown, which are hidden, and which values to set based on…
multipage_form_example_viewdeveloper/examples/multipage_form_example.moduleImplementation of hook_view().
nodeapi_example_form_alterdeveloper/examples/nodeapi_example.moduleImplementation of hook_form_alter().
nodeapi_example_installdeveloper/examples/nodeapi_example.installImplementation of hook_install().
nodeapi_example_nodeapideveloper/examples/nodeapi_example.moduleImplementation of hook_nodeapi().
nodeapi_example_uninstalldeveloper/examples/nodeapi_example.installImplementation of hook_uninstall().
nodeapi_example_update_1developer/examples/nodeapi_example.install
node_access_example_disabledeveloper/examples/node_access_example.installImplementation of hook_disable().
node_access_example_disablingdeveloper/examples/node_access_example.moduleSimple function to make sure we don't respond with grants when disabling ourselves.
node_access_example_enabledeveloper/examples/node_access_example.installImplementation of hook_enable().