/** * {@inheritdoc} */ protected function createEntity($values, $langcode, $bundle_name = NULL) { $values['menu_name'] = 'tools'; $values['route_name'] = 'menu_ui.overview_page'; $values['title'] = 'Test title'; return parent::createEntity($values, $langcode, $bundle_name); }
/** * {@inheritdoc} */ protected function createEntity($values, $langcode, $bundle_name = NULL) { $values['menu_name'] = 'tools'; $values['link']['uri'] = 'internal:/admin/structure/menu'; $values['title'] = 'Test title'; return parent::createEntity($values, $langcode, $bundle_name); }
/** * {@inheritdoc} */ protected function createEntity($values, $langcode, $bundle_name = NULL) { $values['route_name'] = 'user.page'; return parent::createEntity($values, $langcode, $bundle_name); }
/** * Overrides \Drupal\content_translation\Tests\ContentTranslationUITest::createEntity(). */ protected function createEntity($values, $langcode, $comment_type = 'comment_article') { if ($comment_type == 'comment_article') { // This is the article node type, with the 'comment_article' field. $node_type = 'article'; $field_name = 'comment_article'; } else { // This is the page node type with the non-translatable 'comment' field. $node_type = 'page'; $field_name = 'comment'; } $node = $this->drupalCreateNode(array('type' => $node_type, $field_name => array(array('status' => CommentItemInterface::OPEN)))); $values['entity_id'] = $node->id(); $values['entity_type'] = 'node'; $values['field_name'] = $field_name; $values['uid'] = $node->getOwnerId(); return parent::createEntity($values, $langcode, $comment_type); }
/** * {@inheritdoc} */ protected function createEntity($values, $langcode, $bundle_name = NULL) { $values['link']['uri'] = 'internal:/user'; return parent::createEntity($values, $langcode, $bundle_name); }