return (array('error_msg' => $error_msg, 'newId' => $mainActivity->id));
}
+ /**
+ * Get activities for the contact.
+ *
+ * @return array
+ */
public static function getContactActivity() {
$requiredParameters = array(
'cid' => 'Integer',
return empty($errors) ? TRUE : $errors;
}
+ /**
+ * Set the default values for the form.
+ *
+ * @return array
+ */
public function setDefaultValues() {
parent::setDefaultValues();
return $_currencySymbols;
}
+ /**
+ * Update session and uf_match table when the locale is updated.
+ *
+ * @param string $oldLocale
+ * @param string $newLocale
+ * @param array $metadata
+ * @param int $domainID
+ */
public static function onChangeLcMessages($oldLocale, $newLocale, $metadata, $domainID) {
if ($oldLocale == $newLocale) {
return;
);
}
+ /**
+ * Set the default values for the form.
+ *
+ * @return array
+ */
public function setDefaultValues() {
$this->_defaults['limit'] = Civi::settings()->get('dedupe_default_limit');
return $this->_defaults;
return $cachedSymbol;
}
+ /**
+ * Get the default currency symbol.
+ *
+ * @param string $k Unused variable
+ *
+ * @return string
+ */
public static function getDefaultCurrencySymbol($k = NULL) {
$config = CRM_Core_Config::singleton();
return $config->defaultCurrencySymbol(Civi::settings()->get('defaultCurrency'));
CRM_Core_DAO::executeQuery($sql, $params);
}
+ /**
+ * Mark contacts as being in conflict.
+ *
+ * @param int $id1
+ * @param int $id2
+ * @param string $cacheKey
+ * @param array $conflicts
+ *
+ * @return bool
+ */
public static function markConflict($id1, $id2, $cacheKey, $conflicts) {
if (empty($cacheKey) || empty($conflicts)) {
return FALSE;
$this->getRaw());
}
+ /**
+ * Run generator.
+ */
public function run() {
echo "Generating {$this->name} as " . $this->getRelFileName() . "\n";
return $this->raw;
}
+ /**
+ * Get relative file name.
+ *
+ * @return string
+ */
public function getRelFileName() {
return $this->tables[$this->name]['fileName'];
}
/**
+ * Get the absolute file name.
+ *
* @return string
*/
public function getAbsFileName() {
$this->initialized = 1;
}
+ /**
+ * Exit processing after a fatal event, outputting the message.
+ *
+ * @param string $message
+ */
private function fatal($message) {
echo $message;
exit();
return $this->_nativegettext;
}
-
+ /**
+ * Set native locale for getText.
+ *
+ * @param string $locale
+ */
protected function setNativeGettextLocale($locale) {
$locale .= '.utf8';
}
+ /**
+ * Set getText locale.
+ *
+ * @param string $locale
+ */
protected function setPhpGettextLocale($locale) {
// we support both the old file hierarchy format and the new:
}
-
/**
* Return languages available in this instance of CiviCRM.
*
return strtr($str, $tr);
}
+ /**
+ * Get the directory for l10n resources.
+ *
+ * @return string
+ */
public static function getResourceDir() {
static $dir = NULL;
if ($dir === NULL) {
return $params;
}
+ /**
+ * Validate ajax input parameters.
+ *
+ * @param array $requiredParams
+ * @param array $optionalParams
+ *
+ * @return array
+ */
public static function validateParams($requiredParams = array(), $optionalParams = array()) {
$params = array();
return $this;
}
+ /**
+ * Get the locale for translation.
+ *
+ * @return string
+ */
private function getLocale() {
$tsLocale = CRM_Core_I18n::getLocale();
if (!empty($tsLocale)) {
return $result;
}
+ /**
+ * Create stream options.
+ *
+ * @param string $verb
+ * @param string $url
+ * @param string $blob
+ * @param array $headers
+ *
+ * @return array
+ * @throws \Exception
+ */
protected function createStreamOpts($verb, $url, $blob, $headers) {
$result = parent::createStreamOpts($verb, $url, $blob, $headers);
}
}
+ /**
+ * Set default values for the form.
+ *
+ * @return array
+ */
public function setDefaultValues() {
$params = array('id' => $this->_participantId);
$this->assign('displayRecent', FALSE);
}
+ /**
+ * Run listing page.
+ *
+ * @throws \Exception
+ */
public function run() {
$this->preProcess();
$this->add('text', 'name', ts('Batch Name'));
}
+ /**
+ * Set the default values for the form.
+ */
public function setDefaultValues() {
// do not setdefault unless it is open/reopened batch
if (!in_array($this->_batchStatus, array('Open', 'Reopened'))) {
&& $processor->context['actionMapping']->getEntity() === 'civicrm_membership';
}
+ /**
+ * Alter action schedule query.
+ *
+ * @param \Civi\ActionSchedule\Event\MailingQueryEvent $e
+ */
public function alterActionScheduleQuery(\Civi\ActionSchedule\Event\MailingQueryEvent $e) {
if ($e->mapping->getEntity() !== 'civicrm_membership') {
return;
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2017
- * $Id$
- *
*/
/**
- * This class generates form components for processing a pcp page creati
- *
+ * This class generates form components for processing a pcp page.
*/
class CRM_PCP_Form_Campaign extends CRM_Core_Form {
public $_context;
public $_component;
+ /**
+ * Pre-process form.
+ */
public function preProcess() {
// we do not want to display recently viewed items, so turn off
$this->assign('displayRecent', FALSE);
parent::preProcess();
}
+ /**
+ * Set default form values.
+ *
+ * @return array
+ * Default values for the form.
+ */
public function setDefaultValues() {
- $dafaults = array();
+ $defaults = array();
$dao = new CRM_PCP_DAO_PCP();
if ($this->_pageId) {
/**
* Build the form object.
- *
- * @return void
*/
public function buildQuickForm() {
$this->add('text', 'pcp_title', ts('Title'), NULL, TRUE);
/**
* Process the form submission.
- *
- *
- * @return void
*/
public function postProcess() {
$params = $this->controller->exportValues($this->_name);
parent::buildQuickForm();
}
+ /**
+ * Set default values for the form.
+ *
+ * @return array
+ */
public function setDefaultValues() {
$defaults = parent::setDefaultValues();
if (empty($this->_id) || !CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Tag', $this->_id, 'color')) {
return self::$_singleton;
}
+ /**
+ * CRM_Utils_Hook constructor.
+ */
public function __construct() {
$this->cache = CRM_Utils_Cache::create(array(
'name' => 'hooks',
}
}
+ /**
+ * Get the available font names.
+ *
+ * @return array
+ */
public function getFontNames() {
// Define labels for TCPDF core fonts
$fontLabel = array(
$base_url = str_replace('http://', 'https://', $base_url);
}
+ /**
+ * Get the name of the users table.
+ *
+ * @return string
+ */
protected function getUsersTableName() {
$userFrameworkUsersTableName = Civi::settings()->get('userFrameworkUsersTableName');
if (empty($userFrameworkUsersTableName)) {
*/
class CRM_Core_I18n_SchemaStructure
{ldelim}
- static function &columns()
+
+ /**
+ * Get translatable columns.
+ *
+ * @return array
+ * A table-indexed array of translatable columns.
+ */
+ public static function &columns()
{ldelim}
static $result = null;
if (!$result) {ldelim}
{rdelim}
return $result;
{rdelim}
- static function &indices()
+
+ /**
+ * Get a table indexed array of the indices for translatable fields.
+ *
+ * @return array
+ * Indices for translatable fields.
+ */
+ public static function &indices()
{ldelim}
static $result = null;
if (!$result) {ldelim}
{rdelim}
return $result;
{rdelim}
+
+ /**
+ * Get tables with translatable fields.
+ *
+ * @return array
+ * Array of names of tables with fields that can be translated.
+ */
static function &tables()
{ldelim}
static $result = null;
{rdelim}
return $result;
{rdelim}
+
+ /**
+ * Get a list of widgets for editing translatable fields.
+ *
+ * @return array
+ * Array of the widgets for editing translatable fields.
+ */
static function &widgets()
{ldelim}
static $result = null;