3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
17 class CRM_Activity_Import_Field
{
26 * Title of the field to be used in display
38 * Is this field required
44 * Data to be carried for use by a derived class
50 * Regexp to match the CSV header of this column/field
53 public $_headerPattern;
56 * Regexp to match the pattern of data from various column/fields
69 * @param string $title
71 * @param string $headerPattern
72 * @param string $dataPattern
74 public function __construct($name, $title, $type = CRM_Utils_Type
::T_INT
, $headerPattern = '//', $dataPattern = '//') {
76 $this->_title
= $title;
78 $this->_headerPattern
= $headerPattern;
79 $this->_dataPattern
= $dataPattern;
84 public function resetValue() {
89 * The value is in string format. convert the value to the type of this field
90 * and set the field value with the appropriate type
91 * @param string $value
93 public function setValue($value) {
94 $this->_value
= $value;
100 public function validate() {
102 if (CRM_Utils_System
::isNull($this->_value
)) {