<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
// set to the id that we’re reverting at the given moment (if we are)
protected $_revertedId;
+ /**
+ * @param null $title
+ * @param null $mode
+ */
function __construct($title = NULL, $mode = NULL) {
parent::__construct($title, $mode);
),
CRM_Core_Action::DISABLE => array(
'name' => ts('Disable'),
- 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_MessageTemplate' . '\',\'' . 'enable-disable' . '\' );"',
- 'ref' => 'disable-action',
+ 'ref' => 'crm-enable-disable',
'title' => ts('Disable this message template'),
),
CRM_Core_Action::ENABLE => array(
'name' => ts('Enable'),
- 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_MessageTemplate' . '\',\'' . 'disable-enable' . '\' );"',
- 'ref' => 'enable-action',
+ 'ref' => 'crm-enable-disable',
'title' => ts('Enable this message template'),
),
CRM_Core_Action::DELETE => array(
return self::$_links;
}
+ /**
+ * @param CRM_Core_DAO $object
+ * @param int $action
+ * @param array $values
+ * @param array $links
+ * @param string $permission
+ * @param bool $forceAction
+ */
function action(&$object, $action, &$values, &$links, $permission, $forceAction = FALSE) {
if ($object->workflow_id) {
// do not expose action link for reverting to default if the template did not diverge or we just reverted it now
}
}
+ /**
+ * @param null $args
+ * @param null $pageArgs
+ * @param null $sort
+ *
+ * @throws Exception
+ */
function run($args = NULL, $pageArgs = NULL, $sort = NULL) {
// handle the revert action and offload the rest to parent
if (CRM_Utils_Request::retrieve('action', 'String', $this) & CRM_Core_Action::REVERT) {
/**
* Get user context.
*
+ * @param null $mode
+ *
* @return string user context.
*/
function userContext($mode = NULL) {
/**
* browse all entities.
*
- * @param int $action
+ * @internal param int $action
*
* @return void
* @access public