Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function setEntity(ConfigEntityInterface $entity)
 {
     parent::setEntity($entity);
     // Adds the title label to the translation form.
     $node_type = $entity->id();
     $this->addConfigName("core.base_field_override.node.{$node_type}.title");
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 public function setEntity(ConfigEntityInterface $entity)
 {
     parent::setEntity($entity);
     // Adds the title label to the translation form.
     $node_type = $entity->id();
     $config = $this->configFactory->get("core.base_field_override.node.{$node_type}.title");
     if (!$config->isNew()) {
         $this->addConfigName($config->getName());
     }
 }
Esempio n. 3
0
 /**
  * {@inheritdoc}
  */
 public function setEntity(ConfigEntityInterface $entity)
 {
     if (parent::setEntity($entity)) {
         // Field storage config can also contain translatable values. Add the name
         // of the config as well to the list of configs for this entity.
         /** @var \Drupal\field\FieldStorageConfigInterface $field_storage */
         $field_storage = $this->entity->getFieldStorageDefinition();
         /** @var \Drupal\Core\Config\Entity\ConfigEntityTypeInterface $entity_type_info */
         $entity_type_info = $this->entityManager->getDefinition($field_storage->getEntityTypeId());
         $this->addConfigName($entity_type_info->getConfigPrefix() . '.' . $field_storage->id());
         return TRUE;
     }
     return FALSE;
 }
Esempio n. 4
0
 /**
  * Tests ConfigEntityMapper::getOperations().
  */
 public function testGetOperations()
 {
     $result = $this->configEntityMapper->getOperations();
     $expected = array('list' => array('title' => 'List', 'url' => Url::fromRoute('config_translation.entity_list', ['mapper_id' => 'configurable_language'])));
     $this->assertEquals($expected, $result);
 }
 /**
  * Tests ConfigEntityMapper::getOperations().
  */
 public function testGetOperations()
 {
     $result = $this->configEntityMapper->getOperations();
     $expected = array('list' => array('title' => 'List', 'href' => 'admin/config/regional/config-translation/language_entity'));
     $this->assertSame($expected, $result);
 }
 /**
  * {@inheritdoc}
  */
 public function getBaseRouteParameters()
 {
     $parameters = parent::getBaseRouteParameters();
     $parameters['page'] = $this->entity->get('page');
     return $parameters;
 }