Decodes derivative id and plugin id from a string.
string $plugin_id: Plugin identifier that may point to a derivative plugin.
array An array with the base plugin id as the first index and the derivative id as the second. If there is no derivative id it will be null.
protected function decodePluginId($plugin_id) {
// Try and split the passed plugin definition into a plugin and a
// derivative id. We don't need to check for !== FALSE because a leading
// colon would break the derivative system and doesn't makes sense.
if (strpos($plugin_id, ':')) {
return explode(':', $plugin_id, 2);
}
return array(
$plugin_id,
NULL,
);
}