Skip to content

Instantly share code, notes, and snippets.

@jmertic
Created February 25, 2011 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmertic/844139 to your computer and use it in GitHub Desktop.
Save jmertic/844139 to your computer and use it in GitHub Desktop.
/**
* Returns an array of indices for the current module
*
* @return array
*/
private function _getIndexVardefs()
{
$indexes = $this->_focus->getIndices();
if ( $this->_focus->getFieldDefinition('email1') )
$indexes[] = array(
'name' => 'special_idx_email1',
'type' => 'index',
'fields' => array('email1')
);
if ( $this->_focus->getFieldDefinition('email2') )
$indexes[] = array(
'name' => 'special_idx_email2',
'type' => 'index',
'fields' => array('email2')
);
//BEGIN CUSTOMIZATION - Add index for contacts module
if ( $this->_focus->module_dir == 'Contacts') )
$indexes[] = array(
'name' => 'special_idx_first_last_email',
'type' => 'index',
'fields' => array('first_name','last_name','email1')
);
//END CUSTOMIZATION
return $indexes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment