public function Action::fields in Drupal 8
Same name and namespace in other branches
- 9 core/modules/action/src/Plugin/migrate/source/Action.php \Drupal\action\Plugin\migrate\source\Action::fields()
Returns available fields on the source.
Return value
array Available fields in the source, keys are the field machine names as used in field mappings, values are descriptions.
Overrides MigrateSourceInterface::fields
File
- core/
modules/ action/ src/ Plugin/ migrate/ source/ Action.php, line 29
Class
- Action
- Drupal action source from database.
Namespace
Drupal\action\Plugin\migrate\sourceCode
public function fields() {
$fields = [
'aid' => $this
->t('Action ID'),
'type' => $this
->t('Module'),
'callback' => $this
->t('Callback function'),
'parameters' => $this
->t('Action configuration'),
];
if ($this
->getModuleSchemaVersion('system') >= 7000) {
$fields['label'] = $this
->t('Label of the action');
}
else {
$fields['description'] = $this
->t('Action description');
}
return $fields;
}