original_string: private function export_tags(array $tags) : array {
          $user = $this->related['user'];
          $context = $this->related['context'];
          $capabilitymanager = $this->related['capabilitymanager'];
          $canmanagetags = $capabilitymanager->can_manage_tags($user);
  
          return array_values(array_map(function($tag) use ($context, $canmanagetags) {
              $viewurl = core_tag_tag::make_url($tag->tagcollid, $tag->rawname, 0, $context->id);
              return [
                  'id' => $tag->taginstanceid,
                  'tagid' => $tag->id,
                  'isstandard' => $tag->isstandard,
                  'displayname' => $tag->get_display_name(),
                  'flag' => $canmanagetags && !empty($tag->flag),
                  'urls' => [
                      'view' => $viewurl->out(false)
                  ]
              ];
          }, $tags));
      }
code: private function export_tags(array $tags) : array {
          $user = $this->related['user'];
          $context = $this->related['context'];
          $capabilitymanager = $this->related['capabilitymanager'];
          $canmanagetags = $capabilitymanager->can_manage_tags($user);
  
          return array_values(array_map(function($tag) use ($context, $canmanagetags) {
              $viewurl = core_tag_tag::make_url($tag->tagcollid, $tag->rawname, 0, $context->id);
              return [
                  'id' => $tag->taginstanceid,
                  'tagid' => $tag->id,
                  'isstandard' => $tag->isstandard,
                  'displayname' => $tag->get_display_name(),
                  'flag' => $canmanagetags && !empty($tag->flag),
                  'urls' => [
                      'view' => $viewurl->out(false)
                  ]
              ];
          }, $tags));
      }
code_tokens: private function export_tags ( array $ tags ) : array { $ user = $ this -> related [ 'user' ] ; $ context = $ this -> related [ 'context' ] ; $ capabilitymanager = $ this -> related [ 'capabilitymanager' ] ; $ canmanagetags = $ capabilitymanager -> can_manage_tags ( $ user ) ; return array_values ( array_map ( function ( $ tag ) use ( $ context , $ canmanagetags ) { $ viewurl = core_tag_tag :: make_url ( $ tag -> tagcollid , $ tag -> rawname , 0 , $ context -> id ) ; return [ 'id' => $ tag -> taginstanceid , 'tagid' => $ tag -> id , 'isstandard' => $ tag -> isstandard , 'displayname' => $ tag -> get_display_name ( ) , 'flag' => $ canmanagetags && ! empty ( $ tag -> flag ) , 'urls' => [ 'view' => $ viewurl -> out ( false ) ] ] ; } , $ tags ) ) ; }
docstring: Export the list of tags.
  
  @param core_tag_tag[] $tags List of tags to export
  @return array
docstring_tokens: Export the list of tags .