function Action::fields

Same name in other branches
  1. 9 core/modules/system/src/Plugin/migrate/source/Action.php \Drupal\system\Plugin\migrate\source\Action::fields()
  2. 10 core/modules/system/src/Plugin/migrate/source/Action.php \Drupal\system\Plugin\migrate\source\Action::fields()
  3. 11.x core/modules/system/src/Plugin/migrate/source/Action.php \Drupal\system\Plugin\migrate\source\Action::fields()

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\source

Code

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.