Encodes plugin and derivative id's into a string.
string $base_plugin_id: The base plugin identifier.
string $derivative_id: The derivative identifier.
string A uniquely encoded combination of the $base_plugin_id and $derivative_id.
protected function encodePluginId($base_plugin_id, $derivative_id) {
if ($derivative_id) {
return "{$base_plugin_id}:{$derivative_id}";
}
// By returning the unmerged plugin_id, we are able to support derivative
// plugins that support fetching the base definitions.
return $base_plugin_id;
}