Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
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
justinfreeman (Agileware)
Core
Commits
4a9538ac
Commit
4a9538ac
authored
11 years ago
by
colemanw
Browse files
Options
Downloads
Patches
Plain Diff
CRM-13674 - CRM_Core_* - Add smarty functions
parent
46c5a8a1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CRM/Core/Controller.php
+31
-0
31 additions, 0 deletions
CRM/Core/Controller.php
CRM/Core/Form.php
+22
-0
22 additions, 0 deletions
CRM/Core/Form.php
CRM/Core/Page.php
+22
-0
22 additions, 0 deletions
CRM/Core/Page.php
with
75 additions
and
0 deletions
CRM/Core/Controller.php
+
31
−
0
View file @
4a9538ac
...
...
@@ -604,10 +604,41 @@ class CRM_Core_Controller extends HTML_QuickForm_Controller {
self
::
$_template
->
assign
(
$var
,
$value
);
}
/**
* assign value to name in template by reference
*
* @param array|string $name name of variable
* @param mixed $value (reference) value of varaible
*
* @return void
* @access public
*/
function
assign_by_ref
(
$var
,
&
$value
)
{
self
::
$_template
->
assign_by_ref
(
$var
,
$value
);
}
/**
* appends values to template variables
*
* @param array|string $tpl_var the template variable name(s)
* @param mixed $value the value to append
* @param bool $merge
*/
function
append
(
$tpl_var
,
$value
=
NULL
,
$merge
=
FALSE
)
{
self
::
$_template
->
append
(
$tpl_var
,
$value
,
$merge
);
}
/**
* Returns an array containing template variables
*
* @param string $name
* @param string $type
* @return array
*/
function
get_template_vars
(
$name
=
null
)
{
return
self
::
$_template
->
get_template_vars
(
$name
);
}
/**
* setter for embedded
*
...
...
This diff is collapsed.
Click to expand it.
CRM/Core/Form.php
+
22
−
0
View file @
4a9538ac
...
...
@@ -720,6 +720,28 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
self
::
$_template
->
assign_by_ref
(
$var
,
$value
);
}
/**
* appends values to template variables
*
* @param array|string $tpl_var the template variable name(s)
* @param mixed $value the value to append
* @param bool $merge
*/
function
append
(
$tpl_var
,
$value
=
NULL
,
$merge
=
FALSE
)
{
self
::
$_template
->
append
(
$tpl_var
,
$value
,
$merge
);
}
/**
* Returns an array containing template variables
*
* @param string $name
* @param string $type
* @return array
*/
function
get_template_vars
(
$name
=
null
)
{
return
self
::
$_template
->
get_template_vars
(
$name
);
}
function
&
addRadio
(
$name
,
$title
,
&
$values
,
$attributes
=
NULL
,
$separator
=
NULL
,
$required
=
FALSE
)
{
$options
=
array
();
if
(
empty
(
$attributes
))
{
...
...
This diff is collapsed.
Click to expand it.
CRM/Core/Page.php
+
22
−
0
View file @
4a9538ac
...
...
@@ -273,6 +273,28 @@ class CRM_Core_Page {
self
::
$_template
->
assign_by_ref
(
$var
,
$value
);
}
/**
* appends values to template variables
*
* @param array|string $tpl_var the template variable name(s)
* @param mixed $value the value to append
* @param bool $merge
*/
function
append
(
$tpl_var
,
$value
=
NULL
,
$merge
=
FALSE
)
{
self
::
$_template
->
append
(
$tpl_var
,
$value
,
$merge
);
}
/**
* Returns an array containing template variables
*
* @param string $name
* @param string $type
* @return array
*/
function
get_template_vars
(
$name
=
null
)
{
return
self
::
$_template
->
get_template_vars
(
$name
);
}
/**
* function to destroy all the session state of this page.
*
...
...
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