protected function ServicesClientBaseWebTestCase::getPluginUuidFromUrl in Services Client 7.2
Retrieve plugin UUID from URL. If no url is provided, current client URL is used.
Parameters
string $url: URL for UUID search.
Return value
string|NULL UUID if exists otherwise NULL
2 calls to ServicesClientBaseWebTestCase::getPluginUuidFromUrl()
- ServicesClientBaseWebTestCase::addEventCondition in tests/
services_client.test - Adds condition to event.
- ServicesClientBaseWebTestCase::addEventMapping in tests/
services_client.test - Add new mapping row to event.
File
- tests/
services_client.test, line 121 - Tests for the Administration menu module.
Class
- ServicesClientBaseWebTestCase
- @file Tests for the Administration menu module.
Code
protected function getPluginUuidFromUrl($url = NULL) {
$url = $url ?: $this
->getUrl();
$match = array();
preg_match('~^.*/(condition|mapping)/(?P<uuid>[\\d\\w-]+)/edit$~i', $url, $match);
return !empty($match['uuid']) ? $match['uuid'] : NULL;
}