Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fillpdf
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
fillpdf
Commits
d07ac337
Commit
d07ac337
authored
12 years ago
by
Kevin Kaland
Browse files
Options
Downloads
Patches
Plain Diff
Issue #1266714: Add initial traces of Rules integration.
parent
da2ae5d1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fillpdf.module
+11
-0
11 additions, 0 deletions
fillpdf.module
fillpdf.rules.inc
+92
-0
92 additions, 0 deletions
fillpdf.rules.inc
with
103 additions
and
0 deletions
fillpdf.module
+
11
−
0
View file @
d07ac337
...
@@ -532,6 +532,17 @@ function fillpdf_merge_pdf($fid, $nids = NULL, $webform_arr = NULL, $sample = NU
...
@@ -532,6 +532,17 @@ function fillpdf_merge_pdf($fid, $nids = NULL, $webform_arr = NULL, $sample = NU
drupal_exit
();
drupal_exit
();
}
}
/**
* Implementation of fillpdf_merge_pre_handle().
* Set up the data then invoke the Rules event.
*/
function
fillpdf_fillpdf_merge_pre_handle
(
$fillpdf
)
{
// @todo: Implement module_invoke_all() call in fillpdf_merge_pdf at
// appropriate place and implement Rules event invocation here.
rules_invoke_event
(
'fillpdf_merge_pre_handle'
,
$fillpdf
);
}
/**
/**
* Make sure the user has access to data they want to populate the PDF
* Make sure the user has access to data they want to populate the PDF
*/
*/
...
...
This diff is collapsed.
Click to expand it.
fillpdf.rules.inc
0 → 100644
+
92
−
0
View file @
d07ac337
<?php
/**
* @file fillpdf.rules.inc
*
* Come on, you know what this is for! It's in the name!
* (But if you don't - it's for Rules integration.)
*/
/**
* *************
* *Rules hooks*
* *************
*/
/**
* Implements hook_rules_data_info().
* @todo: Define the fillpdf data structure.
* See http://drupal.org/node/905632
*/
function
fillpdf_rules_data_info
()
{
return
array
();
}
/**
* Implements hook_rules_event_info().
* @todo: Define the "Fill PDF has filled the PDF" event
* @todo: Define the following events:
* - Fill PDF is about to prepare PDF-filling data (fillpdf_merge_pre_merge)
* - Fill PDF is ready to fill the PDF (fillpdf_merge_fields_alter)
*/
function
fillpdf_rules_event_info
()
{
$defaults
=
array
(
'group'
=>
t
(
'Fill PDF'
),
'module'
=>
'fillpdf'
,
);
return
array
(
'fillpdf_pre_handle'
=>
$defaults
+
array
(
'label'
=>
t
(
'Filled PDF is about to be handled'
),
'variables'
=>
array
(
'fillpdf'
=>
array
(
'type'
=>
'fillpdf'
,
'label'
=>
'Fill PDF metadata'
),
),
)
);;
}
/**
* Implements hook_rules_action_info().
* @todo: Define the following actions:
* - Fill a PDF
* - Send PDF to user's browser
* - Save PDF to a file
* - Perform the default action on the PDF
*/
function
fillpdf_rules_action_info
()
{
// @todo: Define the "Save PDF to a file" rule
return
array
();
}
/**
* Implements hook_rules_condition_info().
* @todo: Define the following conditions:
* - A node is being filled
* - A Webform is being filled
*/
function
fillpdf_rules_condition_info
()
{
}
/**
* Implements hook_default_rules_configuration().
*/
function
fillpdf_rules_default_rules_configuration
()
{
$default_rules
=
array
();
// @todo: Export the default rule once I create it via the UI and copy the
// code here.
// For attachment-based rules
if
(
module_exists
(
'mimemail'
))
{
}
return
$default_rules
;
}
/**
* *****************
* *Rules callbacks*
* *****************
*/
// @todo: Write these.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment