X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FActivity%2FTokens.php;h=def80cbd850b2738fb88cadddcd216a2dc340d49;hb=87d75c17d1eb404ebb47ae34ea74f40255ebef58;hp=159b1a1a8c77f4cf51d361714da589d2279bbe56;hpb=2423f19be02be6d71d2a5fab5f6b08a0a3143b4e;p=civicrm-core.git diff --git a/CRM/Activity/Tokens.php b/CRM/Activity/Tokens.php index 159b1a1a8c..def80cbd85 100644 --- a/CRM/Activity/Tokens.php +++ b/CRM/Activity/Tokens.php @@ -2,9 +2,9 @@ /* +--------------------------------------------------------------------+ - | CiviCRM version 4.6 | + | CiviCRM version 4.7 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2015 | + | Copyright CiviCRM LLC (c) 2004-2016 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -26,6 +26,11 @@ +--------------------------------------------------------------------+ */ +/** + * @package CRM + * @copyright CiviCRM LLC (c) 2004-2016 + */ + /** * Class CRM_Member_Tokens * @@ -50,6 +55,13 @@ class CRM_Activity_Tokens extends \Civi\Token\AbstractTokenSubscriber { )); } + /** + * Check is active. + * + * @param \Civi\Token\TokenProcessor $processor + * + * @return bool + */ public function checkActive(\Civi\Token\TokenProcessor $processor) { // Extracted from scheduled-reminders code. See the class description. return @@ -62,9 +74,9 @@ class CRM_Activity_Tokens extends \Civi\Token\AbstractTokenSubscriber { return; } - // The join expression for activities needs some extra nuance to handle - // multiple revisions of the activity. Q: Could we simplify & move the - // extra AND clauses into `where(...)`? + // The joint expression for activities needs some extra nuance to handle. + // Multiple revisions of the activity. + // Q: Could we simplify & move the extra AND clauses into `where(...)`? $e->query->param('casEntityJoinExpr', 'e.id = reminder.entity_id AND e.is_current_revision = 1 AND e.is_deleted = 0'); $e->query->select('e.*'); // FIXME: seems too broad. @@ -86,10 +98,12 @@ class CRM_Activity_Tokens extends \Civi\Token\AbstractTokenSubscriber { * * @param \Civi\Token\TokenRow $row * The record for which we want token values. + * @param string $entity * @param string $field * The name of the token field. * @param mixed $prefetch * Any data that was returned by the prefetch(). + * * @return mixed */ public function evaluateToken(\Civi\Token\TokenRow $row, $entity, $field, $prefetch = NULL) {