class AssetInlineEntityFormController in Asset 7
@file Defines the asset inline entity form controller.
Hierarchy
Expanded class hierarchy of AssetInlineEntityFormController
1 string reference to 'AssetInlineEntityFormController'
- asset_entity_info in ./
asset.module - Implements hook_entity_info().
File
- includes/
asset.inline_entity_form.inc, line 8 - Defines the asset inline entity form controller.
View source
class AssetInlineEntityFormController extends EntityInlineEntityFormController {
/**
* {@inheritdoc}
*/
public function defaultLabels() {
$labels = array(
'singular' => t('asset'),
'plural' => t('assets'),
);
return $labels;
}
/**
* {@inheritdoc}
*/
public function entityForm($entity_form, &$form_state) {
$asset = $entity_form['#entity'];
module_load_include('inc', 'asset', 'includes/asset.admin');
return asset_base_form($entity_form, $form_state, $asset);
}
/**
* {@inheritdoc}
*/
public function tableFields($bundles) {
$fields = parent::tableFields($bundles);
$info = entity_get_info($this->entityType);
$metadata = entity_get_property_info($this->entityType);
$type_key = $info['entity keys']['bundle'];
$fields[$type_key] = array(
'type' => 'property',
'label' => $metadata ? $metadata['properties'][$type_key]['label'] : t('Asset Type'),
'weight' => 2,
);
return $fields;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AssetInlineEntityFormController:: |
public | function |
Returns the default entity type labels. Overrides EntityInlineEntityFormController:: |
|
AssetInlineEntityFormController:: |
public | function |
Returns the entity form to be shown through the IEF widget. Overrides EntityInlineEntityFormController:: |
|
AssetInlineEntityFormController:: |
public | function |
Returns an array of fields used to represent an entity in the IEF table. Overrides EntityInlineEntityFormController:: |
|
EntityInlineEntityFormController:: |
protected | property | ||
EntityInlineEntityFormController:: |
public | property | ||
EntityInlineEntityFormController:: |
public | function | Creates a clone of the given entity. | 2 |
EntityInlineEntityFormController:: |
public | function | Returns an array of css filepaths for the current entity type, keyed by theme name. | 1 |
EntityInlineEntityFormController:: |
public | function | Returns an array of default settings in the form of key => value. | 2 |
EntityInlineEntityFormController:: |
public | function | Delete permanently saved entities. | 1 |
EntityInlineEntityFormController:: |
public | function | Handles the submission of an entity form. | 4 |
EntityInlineEntityFormController:: |
public | function | Validates the entity form. | 2 |
EntityInlineEntityFormController:: |
public | function | Returns the entity type managed by this controller. | |
EntityInlineEntityFormController:: |
public | function | Returns a setting value. | |
EntityInlineEntityFormController:: |
public | function | Returns an array of entity type labels fit for display in the UI. | |
EntityInlineEntityFormController:: |
public | function | Returns the remove form to be shown through the IEF widget. | 1 |
EntityInlineEntityFormController:: |
public | function | Handles the submission of a remove form. Decides what should happen to the entity after the removal confirmation. | |
EntityInlineEntityFormController:: |
public | function | Permanently saves the given entity. | 2 |
EntityInlineEntityFormController:: |
public | function | Returns the settings form for the current entity type. | 2 |
EntityInlineEntityFormController:: |
public | function | 1 |