src/Menu/Menu.php
protected function replaceDynamicParameters(array $params)
    {
        foreach ($params as &$param) {
            if (strpos($param, ':') !== 0) {
                continue;
            }
            $name = substr($param, 1);
            if (isset($this->params[$name])) {
                $param = $this->params[$name];
            }
        }

        return $params;
    }
protected function replaceDynamicParameters(array $params)
    {
        foreach ($params as &$param) {
            if (strpos($param, ':') !== 0) {
                continue;
            }
            $name = substr($param, 1);
            if (isset($this->params[$name])) {
                $param = $this->params[$name];
            }
        }

        return $params;
    }
protected function replaceDynamicParameters ( array $ params ) { foreach ( $ params as & $ param ) { if ( strpos ( $ param , ':' ) !== 0 ) { continue ; } $ name = substr ( $ param , 1 ) ; if ( isset ( $ this -> params [ $ name ] ) ) { $ param = $ this -> params [ $ name ] ; } } return $ params ; }
Allows variable or dynamic parameters for all the menu's routes and URLs

Just precede the parameter's name with ":"
For example: :user_id

This method will cycle through all the parameters and replace the dynamic
ones with their corresponding values stored through the setParams and
setParam methods,

If a dynamic value is not found the literal value will be returned.

@param array $params
@return array
Allows variable or dynamic parameters for all the menu s routes and URLs