Issue #2574981 by Manjit.Singh, dimaro, wengerk, darol100, izus, pguillard, vsujeetkumar, Himanshu5050, snehi, paulocs, rakesh.gectcr, jofitz, _utsavsharma, charginghawk, rajeshwari10, sdstyles, quietone, benjifisher, marcusvsouza, LoMo, joelpittet, justAChris, cilefen, YesCT, mradcliffe, spitzialist, annajl, jhodgdon, catch, alexpott, Sabbi0612, kattekrab, Mile23, antojose, leanderl, rodrigoac: Fix grammar ("an URL" should be "a URL") and consistent use of URL (not "url" / "Url") in documentation only
parent
a8edc1b899
commit
00bcd1740c
|
@ -555,10 +555,10 @@ class Drupal {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the url generator service.
|
||||
* Returns the URL generator service.
|
||||
*
|
||||
* @return \Drupal\Core\Routing\UrlGeneratorInterface
|
||||
* The url generator service.
|
||||
* The URL generator service.
|
||||
*/
|
||||
public static function urlGenerator() {
|
||||
return static::getContainer()->get('url_generator');
|
||||
|
|
|
@ -81,7 +81,7 @@ class EntityController implements ContainerInjectionInterface {
|
|||
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
|
||||
* The string translation.
|
||||
* @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator
|
||||
* The url generator.
|
||||
* The URL generator.
|
||||
*/
|
||||
public function __construct(EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info, EntityRepositoryInterface $entity_repository, RendererInterface $renderer, TranslationInterface $string_translation, UrlGeneratorInterface $url_generator) {
|
||||
$this->entityTypeManager = $entity_type_manager;
|
||||
|
|
|
@ -47,7 +47,7 @@ class MaintenanceModeSubscriber implements EventSubscriberInterface {
|
|||
protected $config;
|
||||
|
||||
/**
|
||||
* The url generator.
|
||||
* The URL generator.
|
||||
*
|
||||
* @var \Drupal\Core\Routing\UrlGeneratorInterface
|
||||
*/
|
||||
|
|
|
@ -46,7 +46,7 @@ class Link implements RenderableInterface {
|
|||
* the output of \Drupal\Component\Utility\Xss::filter() or
|
||||
* \Drupal\Component\Render\FormattableMarkup.
|
||||
* @param \Drupal\Core\Url $url
|
||||
* The url object.
|
||||
* The \Drupal\Core\Url object.
|
||||
*/
|
||||
public function __construct($text, Url $url) {
|
||||
$this->text = $text;
|
||||
|
|
|
@ -27,7 +27,7 @@ use Symfony\Component\Routing\Route;
|
|||
* type: entity:node
|
||||
* @endcode
|
||||
*
|
||||
* If you want to have the entity type itself dynamic in the url you can
|
||||
* If you want to have the entity type itself dynamic in the URL you can
|
||||
* specify it like the following:
|
||||
* @code
|
||||
* example.route:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace Drupal\Core\Path;
|
||||
|
||||
/**
|
||||
* Provides an interface for url path validators.
|
||||
* Provides an interface for URL path validators.
|
||||
*/
|
||||
interface PathValidatorInterface {
|
||||
|
||||
|
@ -14,7 +14,7 @@ interface PathValidatorInterface {
|
|||
* The path to check.
|
||||
*
|
||||
* @return \Drupal\Core\Url|false
|
||||
* The url object, or FALSE if the path is not valid.
|
||||
* The \Drupal\Core\Url object, or FALSE if the path is not valid.
|
||||
*/
|
||||
public function getUrlIfValid($path);
|
||||
|
||||
|
@ -28,7 +28,7 @@ interface PathValidatorInterface {
|
|||
* The path to check.
|
||||
*
|
||||
* @return \Drupal\Core\Url|false
|
||||
* The url object, or FALSE if the path is not valid.
|
||||
* The \Drupal\Core\Url object, or FALSE if the path is not valid.
|
||||
*/
|
||||
public function getUrlIfValidWithoutAccessCheck($path);
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ class PathElement extends Textfield {
|
|||
return;
|
||||
}
|
||||
if ($element['#convert_path'] == self::CONVERT_NONE) {
|
||||
// Url is valid, no conversion required.
|
||||
// URL is valid, no conversion required.
|
||||
return;
|
||||
}
|
||||
// We do the value conversion here whilst the Url object is in scope
|
||||
|
|
|
@ -8,7 +8,7 @@ use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
|||
use Symfony\Component\Routing\Route;
|
||||
|
||||
/**
|
||||
* No-op implementation of a Url Generator, needed for backward compatibility.
|
||||
* No-op implementation of a URL Generator, needed for backward compatibility.
|
||||
*/
|
||||
class NullGenerator extends UrlGenerator {
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ class UrlGenerator implements UrlGeneratorInterface {
|
|||
* The route name or other identifying string from ::getRouteDebugMessage().
|
||||
*
|
||||
* @return string
|
||||
* The url path, without any base path, without the query string, not URL
|
||||
* The URL path, without any base path, without the query string, not URL
|
||||
* encoded.
|
||||
*
|
||||
* @throws \Symfony\Component\Routing\Exception\MissingMandatoryParametersException
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace Drupal\Core\Routing;
|
|||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface as SymfonyUrlGeneratorInterface;
|
||||
|
||||
/**
|
||||
* Defines an interface for generating a url from a route or system path.
|
||||
* Defines an interface for generating a URL from a route or system path.
|
||||
*
|
||||
* Provides additional methods and options not present in the base interface.
|
||||
*/
|
||||
|
|
|
@ -98,7 +98,7 @@ class TwigExtension extends AbstractExtension {
|
|||
return [
|
||||
// This function will receive a renderable array, if an array is detected.
|
||||
new TwigFunction('render_var', [$this, 'renderVar']),
|
||||
// The url and path function are defined in close parallel to those found
|
||||
// The URL and path function are defined in close parallel to those found
|
||||
// in \Symfony\Bridge\Twig\Extension\RoutingExtension
|
||||
new TwigFunction('url', [$this, 'getUrl'], ['is_safe_callback' => [$this, 'isUrlGenerationSafe']]),
|
||||
new TwigFunction('path', [$this, 'getPath'], ['is_safe_callback' => [$this, 'isUrlGenerationSafe']]),
|
||||
|
@ -228,7 +228,7 @@ class TwigExtension extends AbstractExtension {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets a rendered link from a url object.
|
||||
* Gets a rendered link from a URL object.
|
||||
*
|
||||
* @param string $text
|
||||
* The link text for the anchor tag as a translated string.
|
||||
|
|
|
@ -208,7 +208,7 @@ trait FunctionalTestSetupTrait {
|
|||
// Rebuild the kernel and bring it back to a fully bootstrapped state.
|
||||
$this->container = $this->kernel->rebuildContainer();
|
||||
|
||||
// Make sure the url generator has a request object, otherwise calls to
|
||||
// Make sure the URL generator has a request object, otherwise calls to
|
||||
// $this->drupalGet() will fail.
|
||||
$this->prepareRequestForGenerator();
|
||||
}
|
||||
|
@ -237,12 +237,12 @@ trait FunctionalTestSetupTrait {
|
|||
*
|
||||
* This is used to manipulate how the generator generates paths during tests.
|
||||
* It also ensures that calls to $this->drupalGet() will work when running
|
||||
* from run-tests.sh because the url generator no longer looks at the global
|
||||
* from run-tests.sh because the URL generator no longer looks at the global
|
||||
* variables that are set there but relies on getting this information from a
|
||||
* request object.
|
||||
*
|
||||
* @param bool $clean_urls
|
||||
* Whether to mock the request using clean urls.
|
||||
* Whether to mock the request using clean URLs.
|
||||
* @param array $override_server_vars
|
||||
* An array of server variables to override.
|
||||
*
|
||||
|
|
|
@ -495,7 +495,7 @@ class Url implements TrustedCallbackInterface {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets this Url to encapsulate an unrouted URI.
|
||||
* Sets this URL to encapsulate an unrouted URI.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -537,7 +537,7 @@ class Url implements TrustedCallbackInterface {
|
|||
}
|
||||
|
||||
/**
|
||||
* Indicates if this Url is external.
|
||||
* Indicates if this URL is external.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -546,7 +546,7 @@ class Url implements TrustedCallbackInterface {
|
|||
}
|
||||
|
||||
/**
|
||||
* Indicates if this Url has a Drupal route.
|
||||
* Indicates if this URL has a Drupal route.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -727,7 +727,7 @@ class Url implements TrustedCallbackInterface {
|
|||
* Sets the value of the absolute option for this Url.
|
||||
*
|
||||
* @param bool $absolute
|
||||
* (optional) Whether to make this Url absolute or not. Defaults to TRUE.
|
||||
* (optional) Whether to make this URL absolute or not. Defaults to TRUE.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -829,13 +829,13 @@ class Url implements TrustedCallbackInterface {
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks a Url render element against applicable access check services.
|
||||
* Checks a URL render element against applicable access check services.
|
||||
*
|
||||
* @param array $element
|
||||
* A render element as returned from \Drupal\Core\Url::toRenderArray().
|
||||
*
|
||||
* @return bool
|
||||
* Returns TRUE if the current user has access to the url, otherwise FALSE.
|
||||
* Returns TRUE if the current user has access to the URL, otherwise FALSE.
|
||||
*/
|
||||
public static function renderAccess(array $element) {
|
||||
return $element['#url']->access();
|
||||
|
|
|
@ -21,7 +21,7 @@ use Drupal\Core\Url;
|
|||
class LinkGenerator implements LinkGeneratorInterface {
|
||||
|
||||
/**
|
||||
* The url generator.
|
||||
* The URL generator.
|
||||
*
|
||||
* @var \Drupal\Core\Routing\UrlGeneratorInterface
|
||||
*/
|
||||
|
@ -106,7 +106,7 @@ class LinkGenerator implements LinkGeneratorInterface {
|
|||
'absolute' => FALSE,
|
||||
];
|
||||
|
||||
// Add a hreflang attribute if we know the language of this link's url and
|
||||
// Add a hreflang attribute if we know the language of this link's URL and
|
||||
// hreflang has not already been set.
|
||||
if (!empty($variables['options']['language']) && !isset($variables['options']['attributes']['hreflang'])) {
|
||||
$variables['options']['attributes']['hreflang'] = $variables['options']['language']->getId();
|
||||
|
|
|
@ -17,7 +17,7 @@ trait BasicAuthTestTrait {
|
|||
* @param string $password
|
||||
* The password to use for basic authentication.
|
||||
* @param array $options
|
||||
* (optional) Options to be forwarded to the url generator.
|
||||
* (optional) Options to be forwarded to the URL generator.
|
||||
*
|
||||
* @return string
|
||||
* The retrieved HTML string, also available as $this->getRawContent().
|
||||
|
|
|
@ -169,7 +169,7 @@ class BlockContentCreationTest extends BlockContentTestBase {
|
|||
$edit = [];
|
||||
$edit['info[0][value]'] = $this->randomMachineName(8);
|
||||
$edit['body[0][value]'] = $this->randomMachineName(16);
|
||||
// Don't pass the custom block type in the url so the default is forced.
|
||||
// Don't pass the custom block type in the URL so the default is forced.
|
||||
$this->drupalGet('block/add');
|
||||
$this->submitForm($edit, 'Save');
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ class CommentInterfaceTest extends CommentTestBase {
|
|||
// Reply to comment #2 creating comment #3 with optional preview and no
|
||||
// subject though field enabled.
|
||||
$this->drupalLogin($this->webUser);
|
||||
// Deliberately use the wrong url to test
|
||||
// Deliberately use the wrong URL to test
|
||||
// \Drupal\comment\Controller\CommentController::redirectNode().
|
||||
$this->drupalGet('comment/' . $this->node->id() . '/reply');
|
||||
// Verify we were correctly redirected.
|
||||
|
|
|
@ -462,7 +462,7 @@ class CommentNonNodeTest extends BrowserTestBase {
|
|||
$this->assertSession()->checkboxChecked('edit-field-foobar-0-status-2');
|
||||
$this->assertSession()->fieldNotExists('edit-field-foobar-0-status-0');
|
||||
|
||||
// @todo Check proper url and form https://www.drupal.org/node/2458323
|
||||
// @todo Check proper URL and form https://www.drupal.org/node/2458323
|
||||
$this->drupalGet('comment/reply/entity_test/comment/' . $new_entity->id());
|
||||
$this->assertSession()->fieldNotExists('subject[0][value]');
|
||||
$this->assertSession()->fieldNotExists('comment_body[0][value]');
|
||||
|
|
|
@ -93,7 +93,7 @@ class CommentTitleTest extends CommentTestBase {
|
|||
// Tests that the comment's title link is the permalink of the comment.
|
||||
$comment_permalink = $this->cssSelect('.permalink');
|
||||
$comment_permalink = $comment_permalink[0]->getAttribute('href');
|
||||
// Tests that the comment's title link contains the url fragment.
|
||||
// Tests that the comment's title link contains the URL fragment.
|
||||
$this->assertStringContainsString('#comment-' . $comment1->id(), $comment_permalink, "The comment's title link contains the url fragment.");
|
||||
$this->assertEquals($comment1->permalink()->toString(), $comment_permalink, "The comment's title has the correct link.");
|
||||
}
|
||||
|
|
|
@ -34,12 +34,12 @@ interface ContactFormInterface extends ConfigEntityInterface {
|
|||
public function getRedirectPath();
|
||||
|
||||
/**
|
||||
* Returns the url object for redirect path.
|
||||
* Returns the \Drupal\Core\Url object for redirect path.
|
||||
*
|
||||
* Empty redirect property results a url object of front page.
|
||||
* Empty redirect property results a \Drupal\Core\Url object of front page.
|
||||
*
|
||||
* @return \Drupal\Core\Url
|
||||
* The redirect url object.
|
||||
* The redirect \Drupal\Core\Url object.
|
||||
*/
|
||||
public function getRedirectUrl();
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ class ContactSitewideTest extends BrowserTestBase {
|
|||
// Default form exists.
|
||||
$this->assertSession()->linkByHrefExists('admin/structure/contact/manage/feedback/delete');
|
||||
// User form could not be changed or deleted.
|
||||
// Cannot use ::assertNoLinkByHref as it does partial url matching and with
|
||||
// Cannot use ::assertNoLinkByHref as it does partial URL matching and with
|
||||
// field_ui enabled admin/structure/contact/manage/personal/fields exists.
|
||||
// @todo: See https://www.drupal.org/node/2031223 for the above.
|
||||
$url = Url::fromRoute('entity.contact_form.edit_form', ['contact_form' => 'personal'])->toString();
|
||||
|
|
|
@ -42,7 +42,7 @@ class ContextualLinks extends RenderElement {
|
|||
* render (based on the 'group' key in the *.links.contextual.yml files for
|
||||
* all enabled modules). The value contains an associative array containing
|
||||
* the following keys:
|
||||
* - route_parameters: The route parameters passed to the url generator.
|
||||
* - route_parameters: The route parameters passed to the URL generator.
|
||||
* - metadata: Any additional data needed in order to alter the link.
|
||||
* @code
|
||||
* array('#contextual_links' => array(
|
||||
|
|
|
@ -7,7 +7,7 @@ use Drupal\migrate\ProcessPluginBase;
|
|||
use Drupal\migrate\Row;
|
||||
|
||||
/**
|
||||
* Process the file url into a D8 compatible URL.
|
||||
* Process the file URL into a D8 compatible URL.
|
||||
*
|
||||
* @MigrateProcessPlugin(
|
||||
* id = "file_uri"
|
||||
|
|
|
@ -111,7 +111,7 @@ class FilterHtmlImageSecureTest extends BrowserTestBase {
|
|||
$images = [
|
||||
$http_base_url . '/' . $druplicon => base_path() . $druplicon,
|
||||
$https_base_url . '/' . $druplicon => base_path() . $druplicon,
|
||||
// Test a url that includes a port.
|
||||
// Test a URL that includes a port.
|
||||
preg_replace($host_pattern, 'http://' . $host . ':', $http_base_url . '/' . $druplicon) => base_path() . $druplicon,
|
||||
preg_replace($host_pattern, 'http://' . $host . ':80', $http_base_url . '/' . $druplicon) => base_path() . $druplicon,
|
||||
preg_replace($host_pattern, 'http://' . $host . ':443', $http_base_url . '/' . $druplicon) => base_path() . $druplicon,
|
||||
|
|
|
@ -12,7 +12,7 @@ use Drupal\Core\Form\FormStateInterface;
|
|||
class ContainerForm extends ForumForm {
|
||||
|
||||
/**
|
||||
* Reusable url stub to use in watchdog messages.
|
||||
* Reusable URL stub to use in watchdog messages.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
|
|
|
@ -22,7 +22,7 @@ class ForumForm extends TermForm {
|
|||
protected $forumFormType;
|
||||
|
||||
/**
|
||||
* Reusable url stub to use in watchdog messages.
|
||||
* Reusable URL stub to use in watchdog messages.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
|
|
|
@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
use Symfony\Component\Routing\Route;
|
||||
|
||||
/**
|
||||
* Defines a route subscriber to register a url for serving image styles.
|
||||
* Defines a route subscriber to register a URL for serving image styles.
|
||||
*/
|
||||
class ImageStyleRoutes implements ContainerInjectionInterface {
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ class PathProcessorLanguage implements InboundPathProcessorInterface, OutboundPa
|
|||
protected $config;
|
||||
|
||||
/**
|
||||
* Language manager for retrieving the url language type.
|
||||
* Language manager for retrieving the URL language type.
|
||||
*
|
||||
* @var \Drupal\language\ConfigurableLanguageManagerInterface
|
||||
*/
|
||||
|
|
|
@ -100,9 +100,9 @@ class LanguageNegotiationContentEntity extends LanguageNegotiationMethodBase imp
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function processOutbound($path, &$options = [], Request $request = NULL, BubbleableMetadata $bubbleable_metadata = NULL) {
|
||||
// If appropriate, process outbound to add a query parameter to the url and
|
||||
// remove the language option, so that url negotiator does not rewrite the
|
||||
// url.
|
||||
// If appropriate, process outbound to add a query parameter to the URL and
|
||||
// remove the language option, so that URL negotiator does not rewrite the
|
||||
// URL.
|
||||
|
||||
// First, check if processing conditions are met.
|
||||
if (!($request && !empty($options['route']) && $this->hasLowerLanguageNegotiationWeight() && $this->meetsContentEntityRoutesCondition($options['route'], $request))) {
|
||||
|
@ -110,8 +110,8 @@ class LanguageNegotiationContentEntity extends LanguageNegotiationMethodBase imp
|
|||
}
|
||||
|
||||
if (isset($options['language']) || $langcode = $this->getLangcode($request)) {
|
||||
// If the language option is set, unset it, so that the url language
|
||||
// negotiator does not rewrite the url.
|
||||
// If the language option is set, unset it, so that the URL language
|
||||
// negotiator does not rewrite the URL.
|
||||
if (isset($options['language'])) {
|
||||
$langcode = $options['language']->getId();
|
||||
unset($options['language']);
|
||||
|
@ -158,13 +158,13 @@ class LanguageNegotiationContentEntity extends LanguageNegotiationMethodBase imp
|
|||
/**
|
||||
* Determines if content entity language negotiator has higher priority.
|
||||
*
|
||||
* The content entity language negotiator having higher priority than the url
|
||||
* The content entity language negotiator having higher priority than the URL
|
||||
* language negotiator, is a criteria in
|
||||
* \Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationContentEntity::processOutbound().
|
||||
*
|
||||
* @return bool
|
||||
* TRUE if the content entity language negotiator has higher priority than
|
||||
* the url language negotiator, FALSE otherwise.
|
||||
* the URL language negotiator, FALSE otherwise.
|
||||
*/
|
||||
protected function hasLowerLanguageNegotiationWeight() {
|
||||
if (!isset($this->hasLowerLanguageNegotiationWeightResult)) {
|
||||
|
@ -173,7 +173,7 @@ class LanguageNegotiationContentEntity extends LanguageNegotiationMethodBase imp
|
|||
$content_method_weights = $this->config->get('language.types')->get('negotiation.language_content.enabled') ?: [];
|
||||
|
||||
// Check if the content language is configured to be dependent on the
|
||||
// url negotiator directly or indirectly over the interface negotiator.
|
||||
// URL negotiator directly or indirectly over the interface negotiator.
|
||||
if (isset($content_method_weights[LanguageNegotiationUrl::METHOD_ID]) && ($content_method_weights[static::METHOD_ID] > $content_method_weights[LanguageNegotiationUrl::METHOD_ID])) {
|
||||
$this->hasLowerLanguageNegotiationWeightResult = FALSE;
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ class LanguageNegotiationContentEntity extends LanguageNegotiationMethodBase imp
|
|||
* Determines if content entity route condition is met.
|
||||
*
|
||||
* Requirements: currently being on a content entity route and processing
|
||||
* outbound url pointing to the same content entity.
|
||||
* outbound URL pointing to the same content entity.
|
||||
*
|
||||
* @param \Symfony\Component\Routing\Route $outbound_route
|
||||
* The route object for the current outbound url being processed.
|
||||
|
|
|
@ -311,7 +311,7 @@ class FormTest extends BrowserTestBase {
|
|||
$this->assertSession()->pageTextContains('The form has become outdated.');
|
||||
$this->assertSession()->fieldValueEquals('integer_step', 5);
|
||||
|
||||
// Check a form with a Url field
|
||||
// Check a form with a URL field
|
||||
$this->drupalGet(Url::fromRoute('form_test.url'));
|
||||
$this->assertSession()
|
||||
->elementExists('css', 'input[name="form_token"]')
|
||||
|
|
|
@ -6,7 +6,7 @@ use Drupal\Tests\BrowserTestBase;
|
|||
use Drupal\language\Entity\ConfigurableLanguage;
|
||||
|
||||
/**
|
||||
* Tests upcasting of url arguments to entities.
|
||||
* Tests upcasting of URL arguments to entities.
|
||||
*
|
||||
* @group ParamConverter
|
||||
*/
|
||||
|
|
|
@ -229,7 +229,7 @@ class RouterTest extends BrowserTestBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Checks the generate method on the url generator using the front router.
|
||||
* Checks the generate method on the URL generator using the front router.
|
||||
*/
|
||||
public function testUrlGeneratorFront() {
|
||||
$front_url = Url::fromRoute('<front>', [], ['absolute' => TRUE]);
|
||||
|
|
|
@ -149,7 +149,7 @@ class TermAutocompleteTest extends TaxonomyTestBase {
|
|||
* @param string|\Drupal\Core\Url $path
|
||||
* Drupal path or URL to load into Mink controlled browser.
|
||||
* @param array $options
|
||||
* (optional) Options to be forwarded to the url generator.
|
||||
* (optional) Options to be forwarded to the URL generator.
|
||||
* @param string[] $headers
|
||||
* (optional) An array containing additional HTTP request headers.
|
||||
*
|
||||
|
|
|
@ -19,10 +19,10 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
|||
class TipPluginImage extends TipPluginBase implements ContainerFactoryPluginInterface, TourTipPluginInterface {
|
||||
|
||||
/**
|
||||
* The url which is used for the image in this Tip.
|
||||
* The URL which is used for the image in this Tip.
|
||||
*
|
||||
* @var string
|
||||
* A url used for the image.
|
||||
* A URL used for the image.
|
||||
*/
|
||||
protected $url;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ class UpdateFetcher implements UpdateFetcherInterface {
|
|||
const UPDATE_DEFAULT_URL = 'https://updates.drupal.org/release-history';
|
||||
|
||||
/**
|
||||
* The fetch url configured in the update settings.
|
||||
* The fetch URL configured in the update settings.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
|
|
|
@ -104,7 +104,7 @@ class UpdateFetcherTest extends UnitTestCase implements LoggerInterface {
|
|||
* @param string $site_key
|
||||
* A string to mimic an anonymous site key hash.
|
||||
* @param string $expected
|
||||
* The expected url returned from UpdateFetcher::buildFetchUrl()
|
||||
* The expected URL returned from UpdateFetcher::buildFetchUrl()
|
||||
*
|
||||
* @dataProvider providerTestUpdateBuildFetchUrl
|
||||
*
|
||||
|
@ -123,7 +123,7 @@ class UpdateFetcherTest extends UnitTestCase implements LoggerInterface {
|
|||
* An array of arrays, each containing:
|
||||
* - 'project' - An array matching a project's .info file structure.
|
||||
* - 'site_key' - An arbitrary site key.
|
||||
* - 'expected' - The expected url from UpdateFetcher::buildFetchUrl().
|
||||
* - 'expected' - The expected URL from UpdateFetcher::buildFetchUrl().
|
||||
*/
|
||||
public function providerTestUpdateBuildFetchUrl() {
|
||||
$data = [];
|
||||
|
|
|
@ -40,7 +40,7 @@ class ViewsForm implements FormInterface, ContainerInjectionInterface {
|
|||
protected $requestStack;
|
||||
|
||||
/**
|
||||
* The url generator to generate the form action.
|
||||
* The URL generator to generate the form action.
|
||||
*
|
||||
* @var \Drupal\Core\Routing\UrlGeneratorInterface
|
||||
*/
|
||||
|
|
|
@ -1445,7 +1445,7 @@ abstract class FieldPluginBase extends HandlerBase implements FieldHandlerInterf
|
|||
}
|
||||
|
||||
// If no scheme is provided in the $path, assign the default 'http://'.
|
||||
// This allows a url of 'www.example.com' to be converted to
|
||||
// This allows a URL of 'www.example.com' to be converted to
|
||||
// 'http://www.example.com'.
|
||||
// Only do this when flag for external has been set, $path doesn't contain
|
||||
// a scheme and $path doesn't have a leading /.
|
||||
|
@ -1493,7 +1493,7 @@ abstract class FieldPluginBase extends HandlerBase implements FieldHandlerInterf
|
|||
return $text;
|
||||
}
|
||||
|
||||
// If we get to here we have a path from the url parsing. So assign that to
|
||||
// If we get to here we have a path from the URL parsing. So assign that to
|
||||
// $path now so we don't get query strings or fragments in the path.
|
||||
$path = $url['path'];
|
||||
|
||||
|
@ -1577,7 +1577,7 @@ abstract class FieldPluginBase extends HandlerBase implements FieldHandlerInterf
|
|||
$options['language'] = $alter['language'];
|
||||
}
|
||||
|
||||
// If the url came from entity_uri(), pass along the required options.
|
||||
// If the URL came from entity_uri(), pass along the required options.
|
||||
if (isset($alter['entity'])) {
|
||||
$options['entity'] = $alter['entity'];
|
||||
}
|
||||
|
|
|
@ -247,7 +247,7 @@ class ViewExecutable {
|
|||
public $row_index;
|
||||
|
||||
/**
|
||||
* Allow to override the url of the current view.
|
||||
* Allow to override the \Drupal\Core\Url of the current view.
|
||||
*
|
||||
* @var \Drupal\Core\Url
|
||||
*/
|
||||
|
|
|
@ -311,11 +311,11 @@ class FieldWebTest extends ViewTestBase {
|
|||
$output = $renderer->executeInRenderContext(new RenderContext(), function () use ($id_field, $row) {
|
||||
return $id_field->theme($row);
|
||||
});
|
||||
// The url has a space in it, so to check we have to decode the url output.
|
||||
// The URL has a space in it, so to check we have to decode the URL output.
|
||||
$this->assertSubString(urldecode($output), $path);
|
||||
|
||||
// Tests the external flag.
|
||||
// Switch on the external flag should output an external url as well.
|
||||
// Switch on the external flag should output an external URL as well.
|
||||
$id_field->options['alter']['external'] = TRUE;
|
||||
$id_field->options['alter']['path'] = $path = 'www.drupal.org';
|
||||
$output = $renderer->executeInRenderContext(new RenderContext(), function () use ($id_field, $row) {
|
||||
|
@ -323,7 +323,7 @@ class FieldWebTest extends ViewTestBase {
|
|||
});
|
||||
$this->assertSubString($output, 'http://www.drupal.org');
|
||||
|
||||
// Setup a not external url, which shouldn't lead to an external url.
|
||||
// Setup a not external URL, which shouldn't lead to an external URL.
|
||||
$id_field->options['alter']['external'] = FALSE;
|
||||
$id_field->options['alter']['path'] = $path = 'www.drupal.org';
|
||||
$output = $renderer->executeInRenderContext(new RenderContext(), function () use ($id_field, $row) {
|
||||
|
|
|
@ -47,7 +47,7 @@ class FieldUrlTest extends ViewsKernelTestBase {
|
|||
|
||||
$this->assertEquals('John', $view->field['name']->advancedRender($view->result[0]));
|
||||
|
||||
// Make the url a link.
|
||||
// Make the URL a link.
|
||||
$view->destroy();
|
||||
$view->setDisplay();
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ class FieldPluginBaseTest extends UnitTestCase {
|
|||
protected $display;
|
||||
|
||||
/**
|
||||
* The mocked url generator.
|
||||
* The mocked URL generator.
|
||||
*
|
||||
* @var \Drupal\Core\Routing\UrlGeneratorInterface|\PHPUnit\Framework\MockObject\MockObject
|
||||
*/
|
||||
|
@ -100,7 +100,7 @@ class FieldPluginBaseTest extends UnitTestCase {
|
|||
protected $pathValidator;
|
||||
|
||||
/**
|
||||
* The unrouted url assembler service.
|
||||
* The unrouted URL assembler service.
|
||||
*
|
||||
* @var \Drupal\Core\Utility\UnroutedUrlAssemblerInterface|\PHPUnit\Framework\MockObject\MockObject
|
||||
*/
|
||||
|
@ -170,7 +170,7 @@ class FieldPluginBaseTest extends UnitTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets up the unrouted url assembler and the link generator.
|
||||
* Sets up the unrouted URL assembler and the link generator.
|
||||
*/
|
||||
protected function setUpUrlIntegrationServices() {
|
||||
$this->pathProcessor = $this->createMock('Drupal\Core\PathProcessor\OutboundPathProcessorInterface');
|
||||
|
@ -235,7 +235,7 @@ class FieldPluginBaseTest extends UnitTestCase {
|
|||
* @param string $path
|
||||
* An internal or external path.
|
||||
* @param string $url
|
||||
* The final url used by the more link.
|
||||
* The final URL used by the more link.
|
||||
*
|
||||
* @dataProvider providerTestRenderTrimmedWithMoreLinkAndPath
|
||||
* @covers ::renderText
|
||||
|
@ -434,7 +434,7 @@ class FieldPluginBaseTest extends UnitTestCase {
|
|||
$url = Url::fromRoute('test_route');
|
||||
$data[] = [$url, [], clone $url, '/test-path', clone $url, '<a href="/test-path">value</a>'];
|
||||
|
||||
// Simple url with parameters.
|
||||
// Simple URL with parameters.
|
||||
$url_parameters = Url::fromRoute('test_route', ['key' => 'value']);
|
||||
$data[] = [$url_parameters, [], clone $url_parameters, '/test-path/value', clone $url_parameters, '<a href="/test-path/value">value</a>'];
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ class DuplicateTest extends UITestBase {
|
|||
$this->drupalGet('admin/structure/views/view/' . $random_view['id'] . '/duplicate');
|
||||
$this->submitForm($view, 'Duplicate');
|
||||
|
||||
// Assert that the page url is correct.
|
||||
// Assert that the page URL is correct.
|
||||
$this->assertSession()->addressEquals('admin/structure/views/view/' . $view['id']);
|
||||
|
||||
// Assert that the page title is correctly displayed.
|
||||
|
|
|
@ -37,7 +37,7 @@ class RedirectTest extends UITestBase {
|
|||
$this->assertSession()->addressEquals($random_destination);
|
||||
|
||||
// Setup a view with a certain page display path. If you change the path
|
||||
// but have the old url in the destination the user should be redirected to
|
||||
// but have the old URL in the destination the user should be redirected to
|
||||
// the new path.
|
||||
$view_name = 'test_redirect_view';
|
||||
$new_path = $this->randomMachineName();
|
||||
|
|
|
@ -110,7 +110,7 @@ JS;
|
|||
* @param string|\Drupal\Core\Url $path
|
||||
* Drupal path or URL to load into Mink controlled browser.
|
||||
* @param array $options
|
||||
* (optional) Options to be forwarded to the url generator.
|
||||
* (optional) Options to be forwarded to the URL generator.
|
||||
* @param string[] $headers
|
||||
* An array containing additional HTTP request headers, the array keys are
|
||||
* the header names and the array values the header values. This is useful
|
||||
|
|
|
@ -69,7 +69,7 @@ class BrowserTestBaseTest extends BrowserTestBase {
|
|||
$js_settings = $this->getDrupalSettings();
|
||||
$this->assertSame('azAZ09();.,\\\/-_{}', $js_settings['test-setting']);
|
||||
|
||||
// Test drupalGet with a url object.
|
||||
// Test drupalGet with a URL object.
|
||||
$url = Url::fromRoute('test_page_test.render_title');
|
||||
$this->drupalGet($url);
|
||||
$this->assertSession()->statusCodeEquals(200);
|
||||
|
|
|
@ -7,7 +7,7 @@ use Drupal\Tests\BrowserTestBase;
|
|||
use Drupal\Tests\Traits\Core\PathAliasTestTrait;
|
||||
|
||||
/**
|
||||
* Tests url generation and routing for route paths with encoded characters.
|
||||
* Tests URL generation and routing for route paths with encoded characters.
|
||||
*
|
||||
* @group path
|
||||
* @group routing
|
||||
|
|
|
@ -6,7 +6,7 @@ use Drupal\KernelTests\KernelTestBase;
|
|||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
* Tests url transform to relative.
|
||||
* Tests URL transform to relative.
|
||||
*
|
||||
* @group Utility
|
||||
*/
|
||||
|
|
|
@ -82,7 +82,7 @@ class UrlHelperTest extends TestCase {
|
|||
* @covers ::isValid
|
||||
*
|
||||
* @param string $url
|
||||
* The url to test.
|
||||
* The URL to test.
|
||||
* @param string $scheme
|
||||
* The scheme to test.
|
||||
*/
|
||||
|
@ -137,7 +137,7 @@ class UrlHelperTest extends TestCase {
|
|||
* @covers ::isValid
|
||||
*
|
||||
* @param string $url
|
||||
* The url to test.
|
||||
* The URL to test.
|
||||
* @param string $scheme
|
||||
* The scheme to test.
|
||||
*/
|
||||
|
@ -171,7 +171,7 @@ class UrlHelperTest extends TestCase {
|
|||
* @covers ::isValid
|
||||
*
|
||||
* @param string $url
|
||||
* The url to test.
|
||||
* The URL to test.
|
||||
* @param string $prefix
|
||||
* The prefix to test.
|
||||
*/
|
||||
|
@ -202,7 +202,7 @@ class UrlHelperTest extends TestCase {
|
|||
* @covers ::isValid
|
||||
*
|
||||
* @param string $url
|
||||
* The url to test.
|
||||
* The URL to test.
|
||||
* @param string $prefix
|
||||
* The prefix to test.
|
||||
*/
|
||||
|
@ -254,7 +254,7 @@ class UrlHelperTest extends TestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Tests url parsing.
|
||||
* Tests URL parsing.
|
||||
*
|
||||
* @dataProvider providerTestParse
|
||||
* @covers ::parse
|
||||
|
@ -502,7 +502,7 @@ class UrlHelperTest extends TestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Tests dangerous url protocol filtering.
|
||||
* Tests dangerous URL protocol filtering.
|
||||
*
|
||||
* @dataProvider providerTestStripDangerousProtocols
|
||||
* @covers ::setAllowedProtocols
|
||||
|
@ -584,12 +584,12 @@ class UrlHelperTest extends TestCase {
|
|||
* Tests detecting external urls that point to local resources.
|
||||
*
|
||||
* @param string $url
|
||||
* The external url to test.
|
||||
* The external URL to test.
|
||||
* @param string $base_url
|
||||
* The base url.
|
||||
* The base URL.
|
||||
* @param bool $expected
|
||||
* TRUE if an external URL points to this installation as determined by the
|
||||
* base url.
|
||||
* base URL.
|
||||
*
|
||||
* @covers ::externalIsLocal
|
||||
* @dataProvider providerTestExternalIsLocal
|
||||
|
@ -599,7 +599,7 @@ class UrlHelperTest extends TestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Provider for local external url detection.
|
||||
* Provider for local external URL detection.
|
||||
*
|
||||
* @see \Drupal\Tests\Component\Utility\UrlHelperTest::testExternalIsLocal()
|
||||
*/
|
||||
|
@ -636,12 +636,12 @@ class UrlHelperTest extends TestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Tests invalid url arguments.
|
||||
* TTests invalid URL arguments.
|
||||
*
|
||||
* @param string $url
|
||||
* The url to test.
|
||||
* The URL to test.
|
||||
* @param string $base_url
|
||||
* The base url.
|
||||
* The base URL.
|
||||
*
|
||||
* @covers ::externalIsLocal
|
||||
* @dataProvider providerTestExternalIsLocalInvalid
|
||||
|
@ -652,7 +652,7 @@ class UrlHelperTest extends TestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Provides invalid argument data for local external url detection.
|
||||
* Provides invalid argument data for local external URL detection.
|
||||
*
|
||||
* @see \Drupal\Tests\Component\Utility\UrlHelperTest::testExternalIsLocalInvalid()
|
||||
*/
|
||||
|
|
|
@ -266,7 +266,7 @@ class UrlConversionTest extends UnitTestCase {
|
|||
*
|
||||
* @return array
|
||||
* Array of arrays with the following elements:
|
||||
* - An invalid Url string.
|
||||
* - An invalid URL string.
|
||||
* - Drupal root string.
|
||||
* - The expected exception message.
|
||||
*/
|
||||
|
|
|
@ -11,7 +11,7 @@ use Symfony\Component\HttpFoundation\RequestStack;
|
|||
/**
|
||||
* Defines a base unit test for testing existence of local tasks.
|
||||
*
|
||||
* @todo Add tests for access checking and url building,
|
||||
* @todo Add tests for access checking and URL building,
|
||||
* https://www.drupal.org/node/2112245.
|
||||
*/
|
||||
abstract class LocalTaskIntegrationTestBase extends UnitTestCase {
|
||||
|
|
|
@ -34,7 +34,7 @@ class UrlGeneratorTest extends UnitTestCase {
|
|||
protected $provider;
|
||||
|
||||
/**
|
||||
* The url generator to test.
|
||||
* The URL generator to test.
|
||||
*
|
||||
* @var \Drupal\Core\Routing\UrlGenerator
|
||||
*/
|
||||
|
@ -452,7 +452,7 @@ class UrlGeneratorTest extends UnitTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Tests that the 'scheme' route requirement is respected during url
|
||||
* Tests that the 'scheme' route requirement is respected during URL
|
||||
* generation.
|
||||
*/
|
||||
public function testUrlGenerationWithHttpsRequirement() {
|
||||
|
|
|
@ -36,7 +36,7 @@ class TwigExtensionTest extends UnitTestCase {
|
|||
protected $renderer;
|
||||
|
||||
/**
|
||||
* The url generator.
|
||||
* The URL generator.
|
||||
*
|
||||
* @var \Drupal\Core\Routing\UrlGeneratorInterface|\PHPUnit\Framework\MockObject\MockObject
|
||||
*/
|
||||
|
|
|
@ -118,7 +118,7 @@ class UrlTest extends UnitTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Tests creating a Url from a request.
|
||||
* Tests creating a URL from a request.
|
||||
*/
|
||||
public function testUrlFromRequest() {
|
||||
$this->router->expects($this->exactly(3))
|
||||
|
@ -358,7 +358,7 @@ class UrlTest extends UnitTestCase {
|
|||
$map[] = ['node_edit', ['node' => '2'], '/node/2/edit'];
|
||||
|
||||
foreach ($urls as $url) {
|
||||
// Clone the url so that there is no leak of internal state into the
|
||||
// Clone the URL so that there is no leak of internal state into the
|
||||
// other ones.
|
||||
$url = clone $url;
|
||||
$url_generator = $this->createMock('Drupal\Core\Routing\UrlGeneratorInterface');
|
||||
|
|
|
@ -28,7 +28,7 @@ class LinkGeneratorTest extends UnitTestCase {
|
|||
protected $linkGenerator;
|
||||
|
||||
/**
|
||||
* The mocked url generator.
|
||||
* The mocked URL generator.
|
||||
*
|
||||
* @var \PHPUnit\Framework\MockObject\MockObject
|
||||
*/
|
||||
|
@ -90,7 +90,7 @@ class LinkGeneratorTest extends UnitTestCase {
|
|||
*/
|
||||
public function providerTestGenerateHrefs() {
|
||||
return [
|
||||
// Test that the url returned by the URL generator is used.
|
||||
// Test that the URL returned by the URL generator is used.
|
||||
['test_route_1', [], FALSE, '/test-route-1'],
|
||||
// Test that $parameters is passed to the URL generator.
|
||||
['test_route_2', ['value' => 'example'], FALSE, '/test-route-2/example'],
|
||||
|
@ -274,7 +274,7 @@ class LinkGeneratorTest extends UnitTestCase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Tests the generate() method with a url containing double quotes.
|
||||
* Tests the generate() method with a URL containing double quotes.
|
||||
*
|
||||
* @covers ::generate
|
||||
*/
|
||||
|
|
|
@ -208,7 +208,7 @@ trait UiHelperTrait {
|
|||
* @param string|\Drupal\Core\Url $path
|
||||
* Drupal path or URL to load into Mink controlled browser.
|
||||
* @param array $options
|
||||
* (optional) Options to be forwarded to the url generator.
|
||||
* (optional) Options to be forwarded to the URL generator.
|
||||
* @param string[] $headers
|
||||
* An array containing additional HTTP request headers, the array keys are
|
||||
* the header names and the array values the header values. This is useful
|
||||
|
@ -264,7 +264,7 @@ trait UiHelperTrait {
|
|||
* Builds an absolute URL from a system path or a URL object.
|
||||
*
|
||||
* @param string|\Drupal\Core\Url $path
|
||||
* A system path or a URL.
|
||||
* A system path or a URL object.
|
||||
* @param array $options
|
||||
* Options to be passed to Url::fromUri().
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue