Skip to content
Snippets Groups Projects
EmailSource.php 863 B
Newer Older
  • Learn to ignore specific revisions
  • jaapjansma's avatar
    jaapjansma committed
    <?php
    /**
     * @author Jaap Jansma <jaap.jansma@civicoop.org>
     * @license AGPL-3.0
     */
    
    
    jaapjansma's avatar
    jaapjansma committed
    namespace Civi\DataProcessor\Source\Contact;
    
    jaapjansma's avatar
    jaapjansma committed
    use Civi\DataProcessor\Source\AbstractCivicrmEntitySource;
    
    jaapjansma's avatar
    jaapjansma committed
    
    use CRM_Dataprocessor_ExtensionUtil as E;
    
    class EmailSource extends AbstractCivicrmEntitySource {
    
      /**
       * Returns the entity name
       *
       * @return String
       */
      protected function getEntity() {
        return 'Email';
      }
    
      /**
       * Returns the table name of this entity
       *
       * @return String
       */
      protected function getTable() {
        return 'civicrm_email';
      }
    
    
    jaapjansma's avatar
    jaapjansma committed
      /**
       * Returns the default configuration for this data source
       *
       * @return array
       */
      public function getDefaultConfiguration() {
        return array(
          'filter' => array(
            'is_primary' => array (
              'op' => '=',
              'value' => '1',
            ),
          )
        );
      }
    
    
    jaapjansma's avatar
    jaapjansma committed
    }