You are here

public function BiblioContributorMetadataController::entityPropertyInfo in Bibliography Module 7.3

Overrides EntityDefaultMetadataController::entityPropertyInfo

File

includes/biblio_contributor.metadata.inc, line 13
Provides Entity metadata integration.

Class

BiblioContributorMetadataController
Extend the default OG membership metadata properties.

Code

public function entityPropertyInfo() {
  $info = parent::entityPropertyInfo();
  $properties =& $info[$this->type]['properties'];

  // Initialize values to prevent WSOD, on certain cases of clear cache.
  $properties = !empty($properties) ? $properties : array();
  $names = array(
    'name',
    'lastname',
    'firstname',
    'prefix',
    'suffix',
    'initials',
  );
  foreach ($names as $name) {
    $properties[$name]['getter callback'] = 'entity_property_verbatim_get';
    $properties[$name]['setter callback'] = 'entity_property_verbatim_set';
  }
  return $info;
}