示例#1
0
 /**
  * returns all the column names of this table
  *
  * @access public
  * @return array
  */
 static function &fields()
 {
     if (!self::$_fields) {
         self::$_fields = array('volunteer_project_id' => array('name' => 'id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('CiviVolunteer Project ID', array('domain' => 'org.civicrm.volunteer')), 'required' => true), 'entity_table' => array('name' => 'entity_table', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Entity Table', array('domain' => 'org.civicrm.volunteer')), 'required' => true, 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG), 'entity_id' => array('name' => 'entity_id', 'type' => CRM_Utils_Type::T_INT, 'required' => true), 'target_contact_id' => array('name' => 'target_contact_id', 'type' => CRM_Utils_Type::T_INT, 'required' => false, 'FKClassName' => 'CRM_Contact_DAO_Contact'), 'is_active' => array('name' => 'is_active', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Enabled', array('domain' => 'org.civicrm.volunteer')), 'required' => true, 'default' => '1'));
     }
     return self::$_fields;
 }
 /**
  * Returns all the column names of this table
  *
  * @return array
  */
 static function &fields()
 {
     if (!self::$_fields) {
         self::$_fields = array('volunteer_project_id' => array('name' => 'id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('CiviVolunteer Project ID', array('domain' => 'org.civicrm.volunteer')), 'description' => 'Project Id', 'required' => true), 'title' => array('name' => 'title', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Title', array('domain' => 'org.civicrm.volunteer')), 'description' => 'The title of the Volunteer Project', 'required' => true, 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'description' => array('name' => 'description', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Description', array('domain' => 'org.civicrm.volunteer')), 'description' => 'Full description of the Volunteer Project. Text and HTML allowed. Displayed on sign-up screens.', 'required' => false, 'rows' => 8, 'cols' => 60, 'html' => array('type' => 'RichTextEditor')), 'entity_table' => array('name' => 'entity_table', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Entity Table', array('domain' => 'org.civicrm.volunteer')), 'description' => 'Entity table for entity_id (initially civicrm_event)', 'required' => true, 'maxlength' => 64, 'size' => CRM_Utils_Type::BIG), 'entity_id' => array('name' => 'entity_id', 'type' => CRM_Utils_Type::T_INT, 'description' => 'Implicit FK project entity (initially eventID).', 'required' => true), 'is_active' => array('name' => 'is_active', 'type' => CRM_Utils_Type::T_BOOLEAN, 'title' => ts('Enabled', array('domain' => 'org.civicrm.volunteer')), 'description' => 'Is this need enabled?', 'required' => true, 'default' => '1'), 'loc_block_id' => array('name' => 'loc_block_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Location Block ID'), 'description' => 'FK to Location Block ID', 'FKClassName' => 'CRM_Core_DAO_LocBlock'), 'campaign_id' => array('name' => 'campaign_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Campaign', array('domain' => 'org.civicrm.volunteer')), 'description' => 'The campaign associated with this Volunteer Project.', 'required' => false, 'FKClassName' => 'CRM_Campaign_DAO_Campaign'));
     }
     return self::$_fields;
 }