* description = @Translation("This field manages configuration and presentation of comments on an entity."),
* list_class = "\Drupal\comment\CommentFieldItemList",
* default_widget = "comment_default",
- * default_formatter = "comment_default"
+ * default_formatter = "comment_default",
+ * cardinality = 1,
* )
*/
class CommentItem extends FieldItemBase implements CommentItemInterface {
'#title' => t('Comments per page'),
'#default_value' => $settings['per_page'],
'#required' => TRUE,
- '#min' => 10,
+ '#min' => 1,
'#max' => 1000,
- '#step' => 10,
];
$element['anonymous'] = [
'#type' => 'select',