Interim commit.
[yaffs-website] / web / modules / contrib / entity_browser / src / Controllers / CtoolsFallback.php
1 <?php
2
3 namespace Drupal\entity_browser\Controllers;
4
5 use Drupal\Core\Controller\ControllerBase;
6 use Drupal\Core\Url;
7
8 /**
9  * Returns markup for entity browser entity add/edit page if ctools is missing.
10  */
11 class CtoolsFallback extends ControllerBase {
12
13   /**
14    * Displays message about missing dependency on edit/add page.
15    *
16    * @return \Drupal\Core\Ajax\AjaxResponse
17    *   An Ajax response with a command for opening or closing the dialog
18    *   containing the edit form.
19    */
20   public function displayMessage() {
21     return [
22       '#markup' => $this->t(
23         'This form depends on <a href=":url">Chaos tool suite module</a>. Enable it and reload this page.',
24         [':url' => Url::fromUri('https://drupal.org/project/ctools')->toString()]
25       ),
26     ];
27   }
28
29 }