Security update for permissions_by_term
[yaffs-website] / vendor / drupal / drupal-driver / src / Drupal / Driver / Fields / Drupal8 / LinkHandler.php
1 <?php
2
3 namespace Drupal\Driver\Fields\Drupal8;
4
5 /**
6  * Link field handler for Drupal 8.
7  */
8 class LinkHandler extends AbstractHandler {
9
10   /**
11    * {@inheritdoc}
12    */
13   public function expand($values) {
14     $return = array();
15     foreach ($values as $value) {
16       $return[] = array(
17         // 'options' is required to be an array, otherwise the utility class
18         // Drupal\Core\Utility\UnroutedUrlAssembler::assemble() will complain.
19         'options' => array(),
20         'title' => $value[0],
21         'uri' => $value[1],
22       );
23     }
24     return $return;
25   }
26
27 }