<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
/**
- * Auxilary class to provide support to the Contact Form class. Does this by implementing
+ * Auxiliary class to provide support to the Contact Form class. Does this by implementing
* a small set of static methods
*
*/
class CRM_Contact_Form_Edit_Household {
/**
- * This function provides the HTML form elements that are specific
+ * This function provides the HTML form elements that are specific.
* to the Household Contact Type
*
- * @param CRM_Core_Form $form form object
- * @param int $inlineEditMode ( 1 for contact summary
+ * @param CRM_Core_Form $form
+ * Form object.
+ * @param int $inlineEditMode
+ * ( 1 for contact summary.
* top bar form and 2 for display name edit )
*
- * @access public
* @return void
*/
public static function buildQuickForm(&$form, $inlineEditMode = NULL) {
$form->applyFilter('__ALL__', 'trim');
- if ( !$inlineEditMode || $inlineEditMode == 1 ) {
+ if (!$inlineEditMode || $inlineEditMode == 1) {
// household_name
$form->add('text', 'household_name', ts('Household Name'), $attributes['household_name']);
}
- if ( !$inlineEditMode || $inlineEditMode == 2 ) {
+ if (!$inlineEditMode || $inlineEditMode == 2) {
// nick_name
$form->addElement('text', 'nick_name', ts('Nickname'), $attributes['nick_name']);
$form->addElement('text', 'contact_source', ts('Source'), CRM_Utils_Array::value('source', $attributes));
}
- if ( !$inlineEditMode ) {
+ if (!$inlineEditMode) {
$form->add('text', 'external_identifier', ts('External ID'), $attributes['external_identifier'], FALSE);
$form->addRule('external_identifier',
ts('External ID already exists in Database.'),
}
/**
- * Add rule for household
+ * Add rule for household.
*
- * @param array $fields array of form values
- * @param array $files - unused
+ * @param array $fields
+ * Array of form values.
+ * @param array $files
+ * Unused.
* @param int $contactID
*
- * @return array|bool $error@static
- * @public
+ * @return array|bool
+ * $error
*/
- static function formRule($fields, $files, $contactID = NULL) {
+ public static function formRule($fields, $files, $contactID = NULL) {
$errors = array();
$primaryID = CRM_Contact_Form_Contact::formRule($fields, $errors, $contactID);
return empty($errors) ? TRUE : $errors;
}
-}
+}