diff --git a/core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php index 28d8aee..5f511c9 100644 --- a/core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php @@ -18,7 +18,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; class MaintenanceModeSubscriber implements EventSubscriberInterface { /** - * Responses with the maintenance page when the site is offline. + * Responds with the maintenance page when the site is offline. * * @param Symfony\Component\HttpKernel\Event\GetResponseEvent $event * The Event to process. diff --git a/core/lib/Drupal/Core/EventSubscriber/PathListenerBase.php b/core/lib/Drupal/Core/EventSubscriber/PathListenerBase.php index 2d560e7..7d09670 100644 --- a/core/lib/Drupal/Core/EventSubscriber/PathListenerBase.php +++ b/core/lib/Drupal/Core/EventSubscriber/PathListenerBase.php @@ -15,7 +15,13 @@ use Symfony\Component\HttpFoundation\Request; abstract class PathListenerBase { /** - * @todo + * Extracts the path from a request object. + * + * @param Symfony\Component\HttpFoundation\Request $request + * The request to extract the path from. + * + * @return string + * The path without leading or trailing slashes. */ public function extractPath(Request $request) { $path = $request->attributes->get('system_path'); @@ -23,7 +29,12 @@ abstract class PathListenerBase { } /** - * @todo + * Sets a new path. + * + * @param Symfony\Component\HttpFoundation\Request $request + * The request to set a new path on. + * @param string $path + * The path to set. */ public function setPath(Request $request, $path) { $request->attributes->set('system_path', $path); diff --git a/core/lib/Drupal/Core/EventSubscriber/ViewSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/ViewSubscriber.php index 7145a0c..14d441c 100644 --- a/core/lib/Drupal/Core/EventSubscriber/ViewSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/ViewSubscriber.php @@ -24,7 +24,7 @@ use Drupal\Core\ContentNegotiation; class ViewSubscriber implements EventSubscriberInterface { /** - * @todo + * The content negotiation object. * * @var Drupal\Core\ContentNegotiation */ @@ -32,6 +32,9 @@ class ViewSubscriber implements EventSubscriberInterface { /** * Constructs a Drupal\Core\EventSubscriber\ViewSubscriber object. + * + * @param Drupal\Core\ContentNegotiation $negotiation + * The content negotiation object to use. */ public function __construct(ContentNegotiation $negotiation) { $this->negotiation = $negotiation; @@ -47,7 +50,10 @@ class ViewSubscriber implements EventSubscriberInterface { * Response object. * * @param Symfony\Component\HttpKernel\Event\GetResponseEvent $event - * The Event to process. + * The event to process. + * + * @return Symfony\Component\HttpFoundation\Response + * A response. */ public function onView(GetResponseEvent $event) { @@ -64,7 +70,13 @@ class ViewSubscriber implements EventSubscriberInterface { } /** - * @todo + * Processes a controller result into a JSON response. + * + * @param Symfony\Component\HttpKernel\Event\GetResponseEvent $event + * The event to process. + * + * @return Symfony\Component\HttpFoundation\JsonResponse + * A JSON response. */ public function onJson(GetResponseEvent $event) { $page_callback_result = $event->getControllerResult(); @@ -76,7 +88,13 @@ class ViewSubscriber implements EventSubscriberInterface { } /** - * @todo + * Processes a controller result into an AJAX response. + * + * @param Symfony\Component\HttpKernel\Event\GetResponseEvent $event + * The event to process. + * + * @return Symfony\Component\HttpFoundation\JsonResponse + * An AJAX response. */ public function onAjax(GetResponseEvent $event) { $page_callback_result = $event->getControllerResult(); @@ -93,7 +111,21 @@ class ViewSubscriber implements EventSubscriberInterface { } /** - * @todo + * Processes a controller result into an AJAX response wrapped in a textarea. + * + * Browser IFRAMEs expect HTML. Browser extensions such as Linkification and + * Skype's browser highlighter convert URLs, phone numbers, etc. into links. + * This corrupts the JSON response. Protect the integrity of the JSON data by + * making it the value of a textarea. + * + * @param Symfony\Component\HttpKernel\GetResponseEvent $event + * The event to process. + * + * @return Symfony\Component\HttpFoundation\Response + * A response. + * + * @see http://malsup.com/jquery/form/#file-upload + * @see http://drupal.org/node/1009382 */ public function onIframeUpload(GetResponseEvent $event) { $page_callback_result = $event->getControllerResult(); @@ -102,12 +134,6 @@ class ViewSubscriber implements EventSubscriberInterface { $commands = ajax_prepare_response($page_callback_result); $json = ajax_render($commands); - // Browser IFRAMEs expect HTML. Browser extensions, such as Linkification - // and Skype's Browser Highlighter, convert URLs, phone numbers, etc. into - // links. This corrupts the JSON response. Protect the integrity of the - // JSON data by making it the value of a textarea. - // @see http://malsup.com/jquery/form/#file-upload - // @see http://drupal.org/node/1009382 $html = ''; return new Response($html); @@ -124,6 +150,9 @@ class ViewSubscriber implements EventSubscriberInterface { * * @param Symfony\Component\HttpKernel\Event\GetResponseEvent $event * The Event to process. + * + * @return Symfony\Component\HttpFoundation\Response + * A response. */ public function onHtml(GetResponseEvent $event) { $page_callback_result = $event->getControllerResult(); diff --git a/core/lib/Drupal/Core/LegacyUrlMatcher.php b/core/lib/Drupal/Core/LegacyUrlMatcher.php index 58f350f..7be030f 100644 --- a/core/lib/Drupal/Core/LegacyUrlMatcher.php +++ b/core/lib/Drupal/Core/LegacyUrlMatcher.php @@ -118,7 +118,7 @@ class LegacyUrlMatcher implements UrlMatcherInterface { * The path being looked up by * * @return - * TODO + * A menu item that matches the given path. */ protected function matchDrupalItem($path) { // For now we can just proxy our procedural method. At some point this will