Classes, traits, and interfaces - main - drupal

Primary tabs

Introduction to classes

A lot of the PHP code in Drupal is object oriented (OO), making use of PHP classes, interfaces, and traits. See the Objected-oriented programming conventions for more information.

See also

Objected-oriented programming conventions

File

core/core.api.php, line 1529

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
MigrateShortcutSetTest class Drupal\Tests\shortcut\Kernel\Migrate\d7 core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetTest.php Test shortcut_set migration to ShortcutSet entities.
MigrateShortcutSetUsersTest class Drupal\Tests\shortcut\Kernel\Migrate\d7 core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutSetUsersTest.php Test shortcut_set_users migration.
MigrateShortcutStubTest class Drupal\Tests\shortcut\Kernel\Migrate core/modules/shortcut/tests/src/Kernel/Migrate/MigrateShortcutStubTest.php Test stub creation for shortcut entities.
MigrateShortcutTest class Drupal\Tests\shortcut\Kernel\Migrate\d7 core/modules/shortcut/tests/src/Kernel/Migrate/d7/MigrateShortcutTest.php Test shortcut menu links migration to Shortcut entities.
MigrateSkipAllRowsTestHooks class Drupal\migrate_skip_all_rows_test\Hook core/modules/migrate/tests/modules/migrate_skip_all_rows_test/src/Hook/MigrateSkipAllRowsTestHooks.php Hook implementations for migrate_skip_all_rows_test.
MigrateSkipProcessException

in drupal:10.3.0 and is removed from drupal:12.0.0. Return FALSE from a process plugin's isPipelineStopped() method to stop further processing on a pipeline.

class Drupal\migrate core/modules/migrate/src/MigrateSkipProcessException.php This exception is thrown when the rest of the process should be skipped. 1
MigrateSkipProcessExceptionTest class Drupal\Tests\migrate\Unit\Exception core/modules/migrate/tests/src/Unit/Exception/MigrateSkipProcessExceptionTest.php Tests deprecation error on MigrateSkipProcessException.
MigrateSkipRowException class Drupal\migrate core/modules/migrate/src/MigrateSkipRowException.php This exception is thrown when a row should be skipped. 22
MigrateSkipRowTest class Drupal\Tests\migrate\Kernel core/modules/migrate/tests/src/Kernel/MigrateSkipRowTest.php Tests row skips triggered during hook_migrate_prepare_row().
MigrateSource class Drupal\migrate\Attribute core/modules/migrate/src/Attribute/MigrateSource.php Defines a MigrateSource attribute. 14
MigrateSource class Drupal\migrate\Annotation core/modules/migrate/src/Annotation/MigrateSource.php Defines a migration source plugin annotation object.
MigrateSourceDiscoveryTest class Drupal\Tests\migrate\Kernel\Plugin\source core/modules/migrate/tests/src/Kernel/Plugin/source/MigrateSourceDiscoveryTest.php Tests discovery of source plugins with annotations.
MigrateSourceInterface interface Drupal\migrate\Plugin core/modules/migrate/src/Plugin/MigrateSourceInterface.php Defines an interface for migrate sources. 2 14
MigrateSourcePluginManager class Drupal\migrate\Plugin core/modules/migrate/src/Plugin/MigrateSourcePluginManager.php Plugin manager for migrate source plugins. 2 2
MigrateSourceTest class Drupal\Tests\migrate\Unit core/modules/migrate/tests/src/Unit/MigrateSourceTest.php Tests Drupal\migrate\Plugin\migrate\source\SourcePluginBase.
MigrateSourceTestBase abstract class Drupal\Tests\migrate\Kernel core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php Base class for tests of Migrate source plugins. 1
MigrateSourceWithAnnotations class Drupal\migrate_source_annotation_bc_test\Plugin\migrate\source core/modules/migrate/tests/modules/migrate_source_annotation_bc_test/src/Plugin/migrate/source/MigrateSourceWithAnnotations.php A migration source plugin with annotations and a single provider.
MigrateSourceWithAnnotationsMultipleProviders class Drupal\migrate_source_annotation_bc_test\Plugin\migrate\source core/modules/migrate/tests/modules/migrate_source_annotation_bc_test/src/Plugin/migrate/source/MigrateSourceWithAnnotationsMultipleProviders.php A migration source plugin with annotations and multiple providers.
MigrateSqlIdMapEnsureTablesTest class Drupal\Tests\migrate\Unit core/modules/migrate/tests/src/Unit/MigrateSqlIdMapEnsureTablesTest.php Tests the SQL ID map plugin ensureTables() method.
MigrateSqlIdMapTest class Drupal\Tests\migrate\Unit core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php Tests the SQL ID map plugin.
MigrateSqlSourceCountCacheTest class Drupal\Tests\migrate\Kernel\Plugin\source core/modules/migrate/tests/src/Kernel/Plugin/source/MigrateSqlSourceCountCacheTest.php Tests SqlBase source count caching.
MigrateSqlSourceTestBase abstract class Drupal\Tests\migrate\Kernel core/modules/migrate/tests/src/Kernel/MigrateSqlSourceTestBase.php Base class for tests of Migrate source plugins that use a database. 96 95
MigrateStatusTest class Drupal\Tests\migrate\Kernel core/modules/migrate/tests/src/Kernel/MigrateStatusTest.php Tests migration status tracking.
MigrateStub class Drupal\migrate core/modules/migrate/src/MigrateStub.php Provides the migrate stubbing service. 2 2
MigrateStubInterface interface Drupal\migrate core/modules/migrate/src/MigrateStubInterface.php Provides an interface for the migrate stub service. 1 1
MigrateStubTest class Drupal\Tests\migrate\Unit core/modules/migrate/tests/src/Unit/MigrateStubTest.php Tests the migrate stub service.
MigrateStubTest class Drupal\Tests\migrate\Kernel core/modules/migrate/tests/src/Kernel/MigrateStubTest.php Tests the migrate.stub Service.
MigrateSyslogConfigsTest class Drupal\Tests\syslog\Kernel\Migrate\d6 core/modules/syslog/tests/src/Kernel/Migrate/d6/MigrateSyslogConfigsTest.php Upgrade variables to syslog.settings.yml.
MigrateSyslogConfigsTest class Drupal\Tests\syslog\Kernel\Migrate\d7 core/modules/syslog/tests/src/Kernel/Migrate/d7/MigrateSyslogConfigsTest.php Upgrade variables to syslog.settings.yml.
MigrateSystemConfigurationTest class Drupal\Tests\system\Kernel\Migrate\d7 core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php Migrates various configuration objects owned by the System module.
MigrateSystemConfigurationTest class Drupal\Tests\system\Kernel\Migrate\d6 core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php Migrates various configuration objects owned by the System module.
MigrateSystemMaintenanceTranslationTest class Drupal\Tests\config_translation\Kernel\Migrate\d6 core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemMaintenanceTranslationTest.php Upgrade i18n maintenance variables to system.*.yml.
MigrateSystemMaintenanceTranslationTest class Drupal\Tests\config_translation\Kernel\Migrate\d7 core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemMaintenanceTranslationTest.php Tests migrations of i18n maintenance variable.
MigrateSystemSiteTranslationTest class Drupal\Tests\config_translation\Kernel\Migrate\d6 core/modules/config_translation/tests/src/Kernel/Migrate/d6/MigrateSystemSiteTranslationTest.php Upgrade i18n_strings site variables to system.*.yml.
MigrateSystemSiteTranslationTest class Drupal\Tests\config_translation\Kernel\Migrate\d7 core/modules/config_translation/tests/src/Kernel/Migrate/d7/MigrateSystemSiteTranslationTest.php Migrate multilingual site variables.
MigrateTaxonomyConfigsTest class Drupal\Tests\taxonomy\Kernel\Migrate core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyConfigsTest.php Upgrade variables to taxonomy.settings.yml.
MigrateTaxonomyTermStubTest class Drupal\Tests\taxonomy\Kernel\Migrate core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyTermStubTest.php Test stub creation for taxonomy terms.
MigrateTaxonomyTermTest class Drupal\Tests\taxonomy\Kernel\Migrate\d6 core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTest.php Upgrade taxonomy terms.
MigrateTaxonomyTermTest class Drupal\Tests\taxonomy\Kernel\Migrate\d7 core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php Upgrade taxonomy terms.
MigrateTaxonomyTermTranslationTest class Drupal\Tests\taxonomy\Kernel\Migrate\d7 core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTranslationTest.php Test migration of translated taxonomy terms.
MigrateTaxonomyTermTranslationTest class Drupal\Tests\content_translation\Kernel\Migrate\d6 core/modules/content_translation/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTranslationTest.php Test migration of translated taxonomy terms.
MigrateTaxonomyVocabularyTest class Drupal\Tests\taxonomy\Kernel\Migrate\d6 core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTest.php Migrate taxonomy vocabularies to taxonomy.vocabulary.*.yml.
MigrateTaxonomyVocabularyTest class Drupal\Tests\taxonomy\Kernel\Migrate\d7 core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTest.php Migrate taxonomy vocabularies to taxonomy.vocabulary.*.yml.
MigrateTaxonomyVocabularyTranslationTest class Drupal\Tests\taxonomy\Kernel\Migrate\d6 core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyVocabularyTranslationTest.php Migrate taxonomy vocabularies to taxonomy.vocabulary.*.yml.
MigrateTaxonomyVocabularyTranslationTest class Drupal\Tests\taxonomy\Kernel\Migrate\d7 core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyVocabularyTranslationTest.php Migrate taxonomy vocabularies to taxonomy.vocabulary.*.yml.
MigrateTermLocalizedTranslationTest class Drupal\Tests\taxonomy\Kernel\Migrate\d6 core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermLocalizedTranslationTest.php Tests migration of localized translated taxonomy terms.
MigrateTermLocalizedTranslationTest class Drupal\Tests\taxonomy\Kernel\Migrate\d7 core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTermLocalizedTranslationTest.php Tests migration of localized translated taxonomy terms.
MigrateTermNodeCompleteTest class Drupal\Tests\taxonomy\Kernel\Migrate\d6 core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeCompleteTest.php Upgrade taxonomy term node associations.
MigrateTermNodeRevisionTest class Drupal\Tests\taxonomy\Kernel\Migrate\d6 core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeRevisionTest.php Upgrade taxonomy term node associations.
MigrateTermNodeTest class Drupal\Tests\taxonomy\Kernel\Migrate\d6 core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeTest.php Upgrade taxonomy term node associations.

Other projects


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