EntityShortcutSet.php

Same filename and directory in other branches
  1. 9 core/modules/shortcut/src/Plugin/migrate/destination/EntityShortcutSet.php
  2. 10 core/modules/shortcut/src/Plugin/migrate/destination/EntityShortcutSet.php
  3. 11.x core/modules/shortcut/src/Plugin/migrate/destination/EntityShortcutSet.php

Namespace

Drupal\shortcut\Plugin\migrate\destination

File

core/modules/shortcut/src/Plugin/migrate/destination/EntityShortcutSet.php

View source
<?php

namespace Drupal\shortcut\Plugin\migrate\destination;

use Drupal\migrate\Row;
use Drupal\migrate\Plugin\migrate\destination\EntityConfigBase;

/**
 * @MigrateDestination(
 *   id = "entity:shortcut_set"
 * )
 */
class EntityShortcutSet extends EntityConfigBase {
    
    /**
     * {@inheritdoc}
     */
    protected function getEntity(Row $row, array $old_destination_id_values) {
        $entity = parent::getEntity($row, $old_destination_id_values);
        // Set the "syncing" flag to TRUE, to avoid duplication of default
        // shortcut links
        $entity->setSyncing(TRUE);
        return $entity;
    }

}

Classes

Title Deprecated Summary
EntityShortcutSet Plugin annotation @MigrateDestination( id = "entity:shortcut_set" )

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