protected function FieldableEntity::getFields in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/migrate_drupal/src/Plugin/migrate/source/d7/FieldableEntity.php \Drupal\migrate_drupal\Plugin\migrate\source\d7\FieldableEntity::getFields()
Returns all non-deleted field instances attached to a specific entity type.
Parameters
string $entity_type: The entity type ID.
string|NULL $bundle: (optional) The bundle.
Return value
array[] The field instances, keyed by field name.
3 calls to FieldableEntity::getFields()
- Comment::prepareRow in core/
modules/ comment/ src/ Plugin/ migrate/ source/ d7/ Comment.php - Add additional data to the row.
- Node::prepareRow in core/
modules/ node/ src/ Plugin/ migrate/ source/ d7/ Node.php - Add additional data to the row.
- User::prepareRow in core/
modules/ user/ src/ Plugin/ migrate/ source/ d7/ User.php - Add additional data to the row.
File
- core/
modules/ migrate_drupal/ src/ Plugin/ migrate/ source/ d7/ FieldableEntity.php, line 29 - Contains \Drupal\migrate_drupal\Plugin\migrate\source\d7\FieldableEntity.
Class
- FieldableEntity
- Base class for D7 source plugins which need to collect field values from the Field API.
Namespace
Drupal\migrate_drupal\Plugin\migrate\source\d7Code
protected function getFields($entity_type, $bundle = NULL) {
return $this
->select('field_config_instance', 'fci')
->fields('fci')
->condition('entity_type', $entity_type)
->condition('bundle', isset($bundle) ? $bundle : $entity_type)
->condition('deleted', 0)
->execute()
->fetchAllAssoc('field_name');
}