function rules_test_entity_property_info_alter

Implements hook_entity_property_info_alter() to add a property without access.

File

tests/rules_test.module, line 12

Code

function rules_test_entity_property_info_alter(&$info) {
    $properties =& $info['site']['properties'];
    $properties['no_access_user'] = array(
        'label' => t("Logged in user"),
        'description' => t("The currently logged in user."),
        'getter callback' => 'entity_metadata_system_get_properties',
        'access callback' => 'rules_test_no_access',
        'type' => 'user',
    );
    $properties =& $info['node']['properties'];
    $properties['reference'] = array(
        'label' => t("Referenced entity"),
        'getter callback' => 'rules_test_get_referenced_entity',
        'type' => 'entity',
    );
    $properties['ref_nodes'] = array(
        'label' => t("Referenced nodes"),
        'getter callback' => 'rules_test_get_referenced_node',
        'type' => 'list<node>',
    );
}