Tabs.php in Double Field 8.3
File
src/Plugin/Field/FieldFormatter/Tabs.php
View source
<?php
namespace Drupal\double_field\Plugin\Field\FieldFormatter;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FieldItemListInterface;
class Tabs extends Base {
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
@trigger_error('Tabs formatter is deprecated in double_field:8.x-3.4 and will be removed in double_field:8.x-4.0. See https://www.drupal.org/node/3067969', E_USER_DEPRECATED);
}
public function viewElements(FieldItemListInterface $items, $langcode) {
$element[0] = [
'#theme' => 'double_field_tabs',
'#items' => $items,
'#settings' => $this
->getSettings(),
'#attached' => [
'library' => [
'double_field/tabs',
],
],
];
return $element;
}
}
Classes
Name |
Description |
Tabs Deprecated |
Plugin implementations for 'tabs' formatter. |