Skip to content

Make the url logged in field:create a clickable link #6216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: 13.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/Commands/field/FieldCreateCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -527,11 +527,9 @@ protected function logResult(FieldConfigInterface $field): void

if ($this->moduleHandler->moduleExists('field_ui')) {
$this->logger()->success(
'Further customisation can be done at the following url:'
. PHP_EOL
. Url::fromRoute($routeName, $routeParams)
->setAbsolute(true)
->toString()
dt('Further customisation can be done through the <href=%editForm>edit form</>.', [
'%editForm' => Url::fromRoute($routeName, $routeParams)->setAbsolute(true)->toString(),
]),
);
}
}
Expand Down
1 change: 0 additions & 1 deletion tests/functional/FieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public function testFieldCreate()
$this->assertStringContainsString("Bundle 'NO-EXIST' does not exist on entity type with id 'unish_article'.", $this->getErrorOutputRaw());
$this->drush(FieldCreateCommands::CREATE, ['unish_article', 'alpha'], ['field-label' => 'Test', 'field-name' => 'field_test3', 'field-type' => 'entity_reference', 'field-widget' => 'entity_reference_autocomplete', 'cardinality' => FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED, 'target-type' => 'unish_article', 'target-bundle' => 'beta']);
$this->assertStringContainsString("Successfully created field 'field_test3' on unish_article type with bundle 'alpha'", $this->getErrorOutputRaw());
$this->assertStringContainsString("http://dev/admin/structure/unish_article_types/manage/alpha/fields/unish_article.alpha.field_test3", $this->getSimplifiedErrorOutput());
$php = "return Drupal::entityTypeManager()->getStorage('field_config')->load('unish_article.alpha.field_test3')->getSettings()";
$this->drush(PhpCommands::EVAL, [$php], ['format' => 'json']);
$settings = $this->getOutputFromJSON();
Expand Down