Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Action.php

function Action::prepareRow

Overrides SourcePluginBase::prepareRow

File

core/modules/system/src/Plugin/migrate/source/Action.php, line 56

Class

Action
Drupal action source from database.

Namespace

Drupal\system\Plugin\migrate\source

Code

public function prepareRow(Row $row) {
    $aid = $row->getSourceProperty('aid');
    if (is_numeric($aid)) {
        if ($this->getModuleSchemaVersion('system') >= 7000) {
            $label = $row->getSourceProperty('label');
        }
        else {
            $label = $row->getSourceProperty('description');
        }
        $row->setSourceProperty('aid', $label);
    }
    return parent::prepareRow($row);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal