Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 11 |
| MenuLinkContentStorageSchema | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
12 | |
0.00% |
0 / 11 |
| getSharedTableFieldSchema | |
0.00% |
0 / 1 |
12 | |
0.00% |
0 / 11 |
|||
| <?php | |
| /** | |
| * @file | |
| * Contains \Drupal\menu_link_content\MenuLinkContentStorageSchema. | |
| */ | |
| namespace Drupal\menu_link_content; | |
| use Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema; | |
| use Drupal\Core\Field\FieldStorageDefinitionInterface; | |
| /** | |
| * Defines the menu_link_content schema handler. | |
| */ | |
| class MenuLinkContentStorageSchema extends SqlContentEntityStorageSchema { | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| protected function getSharedTableFieldSchema(FieldStorageDefinitionInterface $storage_definition, $table_name, array $column_mapping) { | |
| $schema = parent::getSharedTableFieldSchema($storage_definition, $table_name, $column_mapping); | |
| $field_name = $storage_definition->getName(); | |
| if ($table_name == 'menu_link_content') { | |
| switch ($field_name) { | |
| case 'rediscover': | |
| $this->addSharedTableFieldIndex($storage_definition, $schema, TRUE); | |
| break; | |
| } | |
| } | |
| return $schema; | |
| } | |
| } |