You are here

public function Common::routeParam in Filebrowser 8.2

Same name and namespace in other branches
  1. 3.x src/Services/Common.php \Drupal\filebrowser\Services\Common::routeParam()

@func Helper function to create the parameters when calling a route within filebrowser in case of a sub directory $fid is query_fid (node/18?fid=xx) to return to. @var int $query_fid

Return value

string

File

src/Services/Common.php, line 272

Class

Common
Class Common @package Drupal\filebrowser\Services

Namespace

Drupal\filebrowser\Services

Code

public function routeParam($nid, $query_fid = NULL) {
  $p = empty($query_fid) ? [
    'nid' => $nid,
    'query_fid' => 0,
  ] : [
    'nid' => $nid,
    'query_fid' => $query_fid,
  ];
  return $p;
}