You are here

function hook_eck_default_properties in Entity Construction Kit (ECK) 7.2

Same name and namespace in other branches
  1. 7.3 eck.api.php \hook_eck_default_properties()

Defines default properties.

A default property shows up in the property select list when a user is first creating an entity type. These are meant to be commonly use properties that we don't want to configure constantly. There is nothing special about default properties, they are just meant to save time.

There is also an ALTER version of this hook.

1 function implements hook_eck_default_properties()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

eck_eck_default_properties in ./eck.module
Implements hook_eck_default_properties().
1 invocation of hook_eck_default_properties()
eck_get_default_properties in ./eck.default_properties.inc
All default properties information. @todo combine this and get_default_property().

File

./eck.api.php, line 47
ECK's API documentation.

Code

function hook_eck_default_properties() {
  $default_properties = array();
  $default_properties['machine_name'] = array(
    'label' => "My Default Property",
    // @see eck_property_types().
    'type' => "text",
    // To find all of the behaviors that are available, you can use
    // ctools_get_plugins('eck', 'property_behavior');
    // or look at the interface under "manage properties"
    'behavior' => 'some_behavior',
  );
}