国外设计欣赏网站 - DOOOOR.com

 找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,微信登陆

搜索

[Drupal模块] Drupal 7.X/6.X模块介绍:Rules规则模块--处理复杂workflow. 提供Hook

[复制链接]
发表于 6-9-2012 01:15 | 显示全部楼层 |阅读模式

Rules

Rules

The rules module allows site administrators to define conditionally executed actions based on occurring events (known as reactive or ECA rules). It's a replacement with more features for the trigger module in core and the successor of the Drupal 5 workflow-ngmodule.

规则模块允许网站管理员定义上发生的事件称为反应或ECA规则为基础的有条件执行的行动。这是一个触发器模块为核心的Drupal 4 [: W" E d. l) M3 t9 ~/ g1 r% n 5工作流程ngmodule继任更换更多的功能。

规则模块允许网站管理员定义有条件地执行行动的基础上发生的事件(称为被动或主动规则)。这是一个置换更多功能的触发模块的核心和Drupal5 3 u* i7 n9 t- V. Iworkflow-ng模块。

Example use cases

  • Build flexible content publishing workflows changes
  • 建立灵活的内容发布流程变化
  • Send customized mails to notify your users about important
  • 发送定制邮件通知重要用户
  • Create custom redirections, system messages, breadcrumbs, ...
  • 创建自定义的重定向,系统消息,面包屑, ...

And many more...

Modules may use the rules module's API to provide new events, conditions, actions, rule sets as well as default rules, which can be customized by users. Check out the developer docs.

模块可以使用规则模块的接口来提供新的事件,条件,行为,规则集以及默认规则,可以由用户自定义。检查开发文档developer docs

Features

  • Obviously, you may use reaction rules to react upon any event with custom conditions and actions.
  • Allows functionality to be re-used via components (Drupal 6: Rule sets only).
  • Flexible scheduling system that allows scheduling any component / action.
  • Users can share their customizations by using the built-in import/export feature. For that the module also integrates with Features.
  • Modular input evaluation system - for example you can install the Token module and use it in every action.
  • The module has been developed with site performance in mind, so it makes use of caching routines to speed up rule evaluation.
  • Rules 2.x (Drupal 7 only) features improved APIs, a new admin UI, support for all entity types, parameter configuration via simple data selection (i.e. just pass node:author as argument) and much more. See this blog post for more details.

Requirements

Drupal 6:

  • To get token replacements in your actions, install the latest release(6.x-1.12 or later) of the Token module

Drupal 7:

Further resources

To get started have a look at the documentation. Before asking questions read the FAQ.

Credits

The project has been sponsored by

Maintainer

The maintainer provides consulting services and paid development, e.g. for implementing a specific feature. Help improving the module and get in contact!

Downloads




-----------------------------------------------------------------------------
以下选自:hellodrupal,谢谢!


Drupal 7 模块推荐Rules http://t.cn/hrX6D4 可以处理复杂的workflow. 并且提供了Hook,你可以自己定义。比如需求:用户组(用户注册的时候,提供的城市选项), 当新的node发布的时候,可以发一封邮件给指定一个城市下面的所有用户组。rules支持多条件,多action等操作。代码量少,提供开发效率。

通过hook_rules_action_info 可以自定义规则

rules api: 具体文件在模块里rules.api.php

hook_rules_action_info()
hook_rules_file_info()
hook_rules_condition_info()
hook_rules_event_info()
hook_rules_data_info()

rules

|2011-2026-版权声明|平台(网站)公约|DOOOOR 设计网 ( 吉ICP备2022003869号 )

GMT+8, 4-16-2025 08:24 , Processed in 0.409678 second(s), 293 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表