Updated to Drupal 8.6.4, which is PHP 7.3 friendly. Also updated HTMLaw library....
[yaffs-website] / web / core / lib / Drupal / Core / Render / Element / MoreLink.php
1 <?php
2
3 namespace Drupal\Core\Render\Element;
4
5 /**
6  * Provides a link render element for a "more" link, like those used in blocks.
7  *
8  * Properties:
9  * - #title: The text of the link to generate (defaults to 'More').
10  *
11  * See \Drupal\Core\Render\Element\Link for additional properties.
12  *
13  * Usage Example:
14  * @code
15  * $build['more'] = [
16  *   '#type' => 'more_link',
17  *   '#url' => Url::fromRoute('examples.more_examples')
18  * ]
19  * @endcode
20  *
21  * @RenderElement("more_link")
22  */
23 class MoreLink extends Link {
24
25   /**
26    * {@inheritdoc}
27    */
28   public function getInfo() {
29     $info = parent::getInfo();
30     return [
31       '#title' => $this->t('More'),
32       '#theme_wrappers' => [
33         'container' => [
34           '#attributes' => ['class' => ['more-link']],
35         ],
36       ],
37     ] + $info;
38   }
39
40 }