function node_gallery_api_rules_action_info in Node Gallery 7
Implements hook_rules_action_info().
File
- ./
node_gallery_api.rules.inc, line 11 - Rules module integration.
Code
function node_gallery_api_rules_action_info() {
$items = array();
$items['node_gallery_api_gallery_get_items'] = array(
'label' => t('Get gallery items from a gallery'),
'group' => t('Node Gallery'),
'parameter' => array(
'gallery' => array(
'type' => 'node',
'label' => t('Gallery'),
'description' => t('The gallery for which to fetch items.'),
'wrapped' => TRUE,
),
),
'provides' => array(
'gallery_items' => array(
'type' => 'list<node>',
'label' => t('Gallery items'),
),
),
'base' => 'node_gallery_api_rules_gallery_get_items',
);
$items['node_gallery_api_item_get_galleries'] = array(
'label' => t('Get galleries from a gallery item'),
'group' => t('Node Gallery'),
'parameter' => array(
'item' => array(
'type' => 'node',
'label' => t('Gallery Item'),
'description' => t('The gallery item for which to fetch galleries.'),
'wrapped' => TRUE,
),
),
'provides' => array(
'galleries' => array(
'type' => 'list<node>',
'label' => t('Item Galleries'),
),
),
'base' => 'node_gallery_api_rules_item_get_galleries',
);
$items['node_gallery_api_item_add'] = array(
'label' => t('Add item to gallery'),
'group' => t('Node Gallery'),
'parameter' => array(
'item' => array(
'type' => 'node',
'label' => t('Gallery Item'),
'description' => t('The gallery item which is to be added to a gallery.'),
'wrapped' => TRUE,
'save' => TRUE,
),
'gallery' => array(
'type' => 'node',
'label' => t('Gallery'),
'wrapped' => TRUE,
),
),
'base' => 'node_gallery_api_rules_item_add',
);
$items['node_gallery_api_item_remove'] = array(
'label' => t('Remove item from gallery'),
'group' => t('Node Gallery'),
'parameter' => array(
'item' => array(
'type' => 'node',
'label' => t('Gallery Item'),
'description' => t('The gallery item which is to be removed from a gallery.'),
'wrapped' => TRUE,
'save' => TRUE,
),
'gallery' => array(
'type' => 'node',
'label' => t('Gallery'),
'wrapped' => TRUE,
),
),
'base' => 'node_gallery_api_rules_item_remove',
);
$items['node_gallery_api_gallery_set_cover'] = array(
'label' => t('Set cover item of a gallery'),
'group' => t('Node Gallery'),
'parameter' => array(
'item' => array(
'type' => 'node',
'label' => t('Gallery Item'),
'description' => t('The gallery item which is to be the cover item.'),
'wrapped' => TRUE,
'save' => TRUE,
),
'gallery' => array(
'type' => 'node',
'label' => t('Gallery'),
'description' => t('The gallery to set the cover on. Leaving this empty will set the cover item for all galleries the item is in.'),
'wrapped' => TRUE,
'optional' => TRUE,
),
),
'base' => 'node_gallery_api_rules_gallery_set_cover',
);
$items['node_gallery_api_item_set_weight'] = array(
'label' => t('Set weight (sort order) of an item in a gallery'),
'group' => t('Node Gallery'),
'parameter' => array(
'item' => array(
'type' => 'node',
'label' => t('Gallery Item'),
'description' => t('The gallery item which is to be updated.'),
'wrapped' => TRUE,
'save' => TRUE,
),
'weight' => array(
'type' => 'integer',
'label' => t('Weight'),
'description' => t('The weight for the gallery item.'),
'save' => TRUE,
),
'gallery' => array(
'type' => 'node',
'label' => t('Gallery'),
'description' => t('The gallery to set the item weight on. Leaving this empty will set the item weight for all galleries the item is in.'),
'wrapped' => TRUE,
'optional' => TRUE,
),
),
'base' => 'node_gallery_api_rules_item_set_weight',
);
return $items;
}