123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <?php
- function rules_test_custom_node_save($object) {
- throw new RulesEvaluationException('Custom save method invoked.');
- }
- function rules_test_custom_help() {
- return 'custom';
- }
- function rules_action_test_reference($data) {
- $data['changed'] = TRUE;
- return array('arg' => $data);
- }
- function rules_condition_content_is_type($node, $type) {
- return in_array($node->type, $type);
- }
- function rules_condition_content_is_published($node, $settings) {
- return $node->status == 1;
- }
- function rules_action_load_node($nid, $vid = NULL) {
- return array('node_loaded' => node_load($nid, $vid ? $vid : NULL));
- }
- function rules_action_delete_node($node) {
- node_delete($node->nid);
- }
- function rules_action_node_set_title($arguments) {
-
- if ($arguments['node'] instanceof EntityMetadataWrapper) {
- throw new Exception('Argument has not been correctly unwrapped.');
- }
- $arguments['node']->title = $arguments['title'];
- return $arguments;
- }
- function rules_test_type_save($node) {
- }
|