<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
class CRM_Contact_Form_Inline_OpenID extends CRM_Contact_Form_Inline {
/**
- * ims of the contact that is been viewed
+ * Ims of the contact that is been viewed.
*/
private $_openids = array();
/**
- * No of openid blocks for inline edit
+ * No of openid blocks for inline edit.
*/
private $_blockCount = 6;
/**
- * call preprocess
+ * Call preprocess.
*/
public function preProcess() {
parent::preProcess();
}
/**
- * Build the form object elements for openID object
+ * Build the form object elements for openID object.
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
}
/**
- * global validation rules for the form
+ * Global validation rules for the form.
*
- * @param array $fields posted values of the form
- * @param array $errors list of errors to be posted back to the form
+ * @param array $fields
+ * Posted values of the form.
+ * @param array $errors
+ * List of errors to be posted back to the form.
*
- * @return array $errors@static
- * @access public
+ * @return array
*/
- static function formRule($fields, $errors) {
+ public static function formRule($fields, $errors) {
$hasData = $hasPrimary = $errors = array();
if (!empty($fields['openid']) && is_array($fields['openid'])) {
foreach ($fields['openid'] as $instance => $blockValues) {
if (!empty($blockValues['is_primary'])) {
$hasPrimary[] = $instance;
if (!$primaryID && !empty($blockValues['openid'])) {
- $primaryID = $blockValues['openid'];
+ $primaryID = $blockValues['openid'];
}
}
}
}
if (count($hasPrimary) > 1) {
- $errors["openid[".array_pop($hasPrimary)."][is_primary]"] = ts('Only one OpenID can be marked as primary.');
+ $errors["openid[" . array_pop($hasPrimary) . "][is_primary]"] = ts('Only one OpenID can be marked as primary.');
}
}
return $errors;
}
/**
- * set defaults for the form
+ * Set defaults for the form.
*
* @return array
- * @access public
*/
public function setDefaultValues() {
$defaults = array();
}
/**
- * process the form
+ * Process the form.
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->exportValues();
$this->log();
$this->response();
}
+
}