function NodeType::fields
Returns available fields on the source.
Return value
array Available fields in the source, keys are the field machine names as used in field mappings, values are descriptions.
Overrides MigrateSourceInterface::fields
File
-
core/
modules/ node/ src/ Plugin/ migrate/ source/ d7/ NodeType.php, line 47
Class
- NodeType
- Drupal 7 Node types source from database.
Namespace
Drupal\node\Plugin\migrate\source\d7Code
public function fields() {
$fields = [
'type' => $this->t('Machine name of the node type.'),
'name' => $this->t('Human name of the node type.'),
'description' => $this->t('Description of the node type.'),
'help' => $this->t('Help text for the node type.'),
'title_label' => $this->t('Title label.'),
'disabled' => $this->t('Flag indicating the node type is enable'),
'base' => $this->t('base node.'),
'custom' => $this->t('Flag.'),
'modified' => $this->t('Flag.'),
'locked' => $this->t('Flag.'),
'orig_type' => $this->t('The original type.'),
'teaser_length' => $this->t('Teaser length'),
];
if ($this->moduleExists('comment')) {
$fields += $this->getCommentFields();
}
return $fields;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.