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

Breadcrumb

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

function ImageCachePreset::prepareRow

Overrides SourcePluginBase::prepareRow

File

core/modules/image/src/Plugin/migrate/source/d6/ImageCachePreset.php, line 56

Class

ImageCachePreset
Drupal 6 imagecache presets source from database.

Namespace

Drupal\image\Plugin\migrate\source\d6

Code

public function prepareRow(Row $row) {
    $actions = [];
    $results = $this->select('imagecache_action', 'ica')
        ->fields('ica')
        ->condition('presetid', $row->getSourceProperty('presetid'))
        ->execute();
    foreach ($results as $key => $result) {
        $actions[$key] = $result;
        $actions[$key]['data'] = unserialize($result['data']);
    }
    $row->setSourceProperty('actions', $actions);
    return parent::prepareRow($row);
}
RSS feed
Powered by Drupal