class MigrateSourceWithAnnotations

A migration source plugin with annotations and a single provider.

This plugin exists to test backwards compatibility of source plugin discovery for plugin classes using annotations. This class has no providers other than 'migrate_source_annotation_bc_test' and 'core'. This class and its annotation should remain until annotation support is completely removed.

Plugin annotation


@MigrateSource(
  id = "annotated",
  source_module = "migrate"
)

Hierarchy

Expanded class hierarchy of MigrateSourceWithAnnotations

File

core/modules/migrate/tests/modules/migrate_source_annotation_bc_test/src/Plugin/migrate/source/MigrateSourceWithAnnotations.php, line 22

Namespace

Drupal\migrate_source_annotation_bc_test\Plugin\migrate\source
View source
class MigrateSourceWithAnnotations extends SourcePluginBase {
    
    /**
     * {@inheritdoc}
     */
    public function fields() {
        return [];
    }
    
    /**
     * {@inheritdoc}
     */
    public function __toString() {
        return 'Annotated';
    }
    
    /**
     * {@inheritdoc}
     */
    public function getIds() {
        return [];
    }
    
    /**
     * {@inheritdoc}
     */
    protected function initializeIterator() {
        return new \ArrayIterator();
    }

}

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