Skip to content
Snippets Groups Projects
Commit 943c3839 authored by Klaas Eikelboom's avatar Klaas Eikelboom
Browse files

Added a datasource for Country: Now you can sort on the country name

parent 24370b8a
No related branches found
No related tags found
No related merge requests found
# Version 1.97 (not yet released)
* Added a datasource for Country: Now you can sort on the country name.
# Version 1.96
* Prevent fatal PHP 8.1 error with CompareFieldFilter.
......
......@@ -119,6 +119,7 @@ class Factory {
$this->addDataSource('entity_tag', new Definition('Civi\DataProcessor\Source\Tag\EntityTagSource'), E::ts('Entity Tag (Link between an entity and a tag)'));
$this->addDataSource('email', new Definition('Civi\DataProcessor\Source\Contact\EmailSource'), E::ts('Email'));
$this->addDataSource('address', new Definition('Civi\DataProcessor\Source\Contact\AddressSource'), E::ts('Address'));
$this->addDataSource('country', new Definition('Civi\DataProcessor\Source\Contact\CountrySource'), E::ts('Country'));
$this->addDataSource('phone', new Definition('Civi\DataProcessor\Source\Contact\PhoneSource'), E::ts('Phone'));
$this->addDataSource('website', new Definition('Civi\DataProcessor\Source\Contact\WebsiteSource'), E::ts('Website'));
$this->addDataSource('campaign', new Definition('Civi\DataProcessor\Source\Campaign\CampaignSource'), E::ts('Campaign'));
......
<?php
/**
* @author Klaas Eikelboom <klaas.eikelboom@civicoop.org>
* @license AGPL-3.0
*/
namespace Civi\DataProcessor\Source\Contact;
use Civi\DataProcessor\Source\AbstractCivicrmEntitySource;
use CRM_Dataprocessor_ExtensionUtil as E;
class CountrySource extends AbstractCivicrmEntitySource {
/**
* Returns the entity name
*
* @return String
*/
protected function getEntity() {
return 'Country';
}
/**
* Returns the table name of this entity
*
* @return String
*/
protected function getTable() {
return 'civicrm_country';
}
/**
* Returns the default configuration for this data source
*
* @return array
*/
public function getDefaultConfiguration() {
return array();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment