class ViewModeBase
Same name and namespace in other branches
- 11.x core/modules/node/src/Plugin/migrate/source/d6/ViewModeBase.php \Drupal\node\Plugin\migrate\source\d6\ViewModeBase
A base class for migrations that require view mode info.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
- class \Drupal\migrate\Plugin\migrate\source\SourcePluginBase extends \Drupal\migrate\Plugin\MigrateSourceInterface, \Drupal\migrate\Event\RollbackAwareInterface implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\migrate\Plugin\migrate\source\SqlBase extends \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\migrate\Plugin\RequirementsInterface implements \Drupal\migrate\Plugin\migrate\source\SourcePluginBase
- class \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase extends \Drupal\Component\Plugin\DependentPluginInterface uses \Drupal\Core\Entity\DependencyTrait implements \Drupal\migrate\Plugin\migrate\source\SqlBase
- class \Drupal\node\Plugin\migrate\source\d6\ViewModeBase implements \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase
- class \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase extends \Drupal\Component\Plugin\DependentPluginInterface uses \Drupal\Core\Entity\DependencyTrait implements \Drupal\migrate\Plugin\migrate\source\SqlBase
- class \Drupal\migrate\Plugin\migrate\source\SqlBase extends \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\migrate\Plugin\RequirementsInterface implements \Drupal\migrate\Plugin\migrate\source\SourcePluginBase
- class \Drupal\migrate\Plugin\migrate\source\SourcePluginBase extends \Drupal\migrate\Plugin\MigrateSourceInterface, \Drupal\migrate\Event\RollbackAwareInterface implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
Expanded class hierarchy of ViewModeBase
1 file declares its use of ViewModeBase
- FieldInstancePerViewMode.php in core/
modules/ field/ src/ Plugin/ migrate/ source/ d6/ FieldInstancePerViewMode.php
File
-
core/
modules/ node/ src/ Plugin/ migrate/ source/ d6/ ViewModeBase.php, line 10
Namespace
Drupal\node\Plugin\migrate\source\d6View source
abstract class ViewModeBase extends DrupalSqlBase {
/**
* {@inheritdoc}
*/
protected function doCount() {
return count($this->initializeIterator());
}
/**
* Get a list of D6 view modes.
*
* Drupal 6 supported the following view modes.
* NODE_BUILD_NORMAL = 0
* NODE_BUILD_PREVIEW = 1
* NODE_BUILD_SEARCH_INDEX = 2
* NODE_BUILD_SEARCH_RESULT = 3
* NODE_BUILD_RSS = 4
* NODE_BUILD_PRINT = 5
* teaser
* full
*
* @return array
* The view mode names.
*/
public function getViewModes() {
return [
0,
1,
2,
3,
4,
5,
'teaser',
'full',
];
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.