Examples

You are here

  1. 7 examples.module examples
  2. 6 examples.module examples
  3. 8 examples.module examples

Well-documented API examples for a broad range of Drupal 7 core functionality.

Developers can learn how to use a particular API quickly by experimenting with the examples, and adapt them for their own use.

Download the Examples for Developers Project (and participate with submissions, bug reports, patches, and documentation) at http://drupal.org/project/examples

Functions

Namesort descending Location Description
examples_help ./examples.module Implements hook_help().

File

./examples.module, line 14
This file serves as a stub file for the many Examples modules in the Examples for Developers Project which you can download and experiment with.

Comments

Hello guys,
thank you for the effort. The examples look nice (good job). I found an error in the Entity Example. When I click the link called "Add an Entity Example Basic Entity", type in a description and click "Save" button, I get the following errors:

- Warning: Illegal offset type in isset or empty in rules_entity_presave() (line 62 of C:\xampp\htdocs\sites\all\modules\rules\modules\events.inc).
- Warning: Illegal offset type in isset or empty in rules_entity_insert() (line 95 of C:\xampp\htdocs\sites\all\modules\rules\modules\events.inc).

Can you fix this? I don't know how to solve it.

Thank you in advance.

Exactly the same problem here. Cant seem to find a fix either.

line 303 change...
module_invoke_all('entity_insert', 'basic', $basic);
to...
module_invoke_all('entity_insert', $basic, 'basic');

I noticed the user module passes the arguments in a different order so I took reference from it and tried switching them in the example. Not ran into any errors since.