class EntityformTypeMetadataController in Entityform 7.2
Same name and namespace in other branches
- 7 entityform.info.inc \EntityformTypeMetadataController
Extend the defaults.
Hierarchy
Expanded class hierarchy of EntityformTypeMetadataController
1 string reference to 'EntityformTypeMetadataController'
- entityform_entity_info in ./
entityform.module - Implements hook_entity_info().
File
- ./
entityform.info.inc, line 59 - Provides Entity metadata integration.
View source
class EntityformTypeMetadataController extends EntityDefaultMetadataController {
public function entityPropertyInfo() {
$info = parent::entityPropertyInfo();
$properties =& $info[$this->type]['properties'];
$properties['type']['type'] = 'text';
// Add properties for translatable fields.
$labels = entity_get_controller('entityform_type')
->get_text_labels();
foreach ($labels as $text_prop => $label) {
if (!isset($properties[$text_prop])) {
$properties[$text_prop] = array();
}
$properties[$text_prop] += array(
'label' => $label,
'getter callback' => 'entityformtype_metadata_get_properties',
'setter callback' => 'entityformtype_metadata_set_properties',
'type' => 'text',
'translatable' => TRUE,
'i18n string' => TRUE,
);
// Testing if this will allow property to be translated.
// @todo remove flag all formatted properties.
if (in_array($text_prop, array(
'instruction_pre',
'submission_text',
))) {
$properties[$text_prop]['format'] = 'format';
}
}
return $info;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityDefaultMetadataController:: |
protected | property | ||
EntityDefaultMetadataController:: |
public static | function | A options list callback returning all bundles for an entity type. | |
EntityDefaultMetadataController:: |
protected | function | Return a set of properties for an entity based on the schema definition | |
EntityDefaultMetadataController:: |
public | function | ||
EntityformTypeMetadataController:: |
public | function |
Overrides EntityDefaultMetadataController:: |