repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
typhonius/acquia-php-sdk-v2 | src/CloudApi/Connector.php | Connector.request | public function request(string $verb, string $path, array $query = [], array $options = [])
{
$options['query'] = $query;
if (!empty($options['query']['filter']) && is_array($options['query']['filter'])) {
// Default to an AND filter.
$options['query']['filter'] = implode(',... | php | public function request(string $verb, string $path, array $query = [], array $options = [])
{
$options['query'] = $query;
if (!empty($options['query']['filter']) && is_array($options['query']['filter'])) {
// Default to an AND filter.
$options['query']['filter'] = implode(',... | [
"public",
"function",
"request",
"(",
"string",
"$",
"verb",
",",
"string",
"$",
"path",
",",
"array",
"$",
"query",
"=",
"[",
"]",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"options",
"[",
"'query'",
"]",
"=",
"$",
"query",
";"... | Takes parameters passed in, makes a request to the API, and processes the response.
@param string $verb
@param string $path
@param array $query
@param array $options
@return object|array|StreamInterface | [
"Takes",
"parameters",
"passed",
"in",
"makes",
"a",
"request",
"to",
"the",
"API",
"and",
"processes",
"the",
"response",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Connector.php#L61-L72 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Connector.php | Connector.makeRequest | public function makeRequest(string $verb, string $path, array $query = [], array $options = [])
{
try {
$response = $this->client->$verb(self::BASE_URI . $path, $options);
} catch (ClientException $e) {
print $e->getMessage();
$response = $e->getResponse();
... | php | public function makeRequest(string $verb, string $path, array $query = [], array $options = [])
{
try {
$response = $this->client->$verb(self::BASE_URI . $path, $options);
} catch (ClientException $e) {
print $e->getMessage();
$response = $e->getResponse();
... | [
"public",
"function",
"makeRequest",
"(",
"string",
"$",
"verb",
",",
"string",
"$",
"path",
",",
"array",
"$",
"query",
"=",
"[",
"]",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"try",
"{",
"$",
"response",
"=",
"$",
"this",
"->",
"c... | Makes a request to the API.
@param string $verb
@param string $path
@param array $query
@param array $options
@return ResponseInterface | [
"Makes",
"a",
"request",
"to",
"the",
"API",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Connector.php#L83-L93 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Connector.php | Connector.processResponse | public function processResponse(ResponseInterface $response)
{
$body = $response->getBody();
$object = json_decode($body);
if (json_last_error() === JSON_ERROR_NONE) {
// JSON is valid
if (property_exists($object, '_embedded') && property_exists($object->_embedded, ... | php | public function processResponse(ResponseInterface $response)
{
$body = $response->getBody();
$object = json_decode($body);
if (json_last_error() === JSON_ERROR_NONE) {
// JSON is valid
if (property_exists($object, '_embedded') && property_exists($object->_embedded, ... | [
"public",
"function",
"processResponse",
"(",
"ResponseInterface",
"$",
"response",
")",
"{",
"$",
"body",
"=",
"$",
"response",
"->",
"getBody",
"(",
")",
";",
"$",
"object",
"=",
"json_decode",
"(",
"$",
"body",
")",
";",
"if",
"(",
"json_last_error",
... | Processes the returned response from the API.
@param ResponseInterface $response
@return object|array|StreamInterface
@throws \Exception | [
"Processes",
"the",
"returned",
"response",
"from",
"the",
"API",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Connector.php#L102-L129 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Client.php | Client.addQuery | public function addQuery($name, $value)
{
$this->query = array_merge_recursive($this->query, [$name => $value]);
} | php | public function addQuery($name, $value)
{
$this->query = array_merge_recursive($this->query, [$name => $value]);
} | [
"public",
"function",
"addQuery",
"(",
"$",
"name",
",",
"$",
"value",
")",
"{",
"$",
"this",
"->",
"query",
"=",
"array_merge_recursive",
"(",
"$",
"this",
"->",
"query",
",",
"[",
"$",
"name",
"=>",
"$",
"value",
"]",
")",
";",
"}"
] | Add a query parameter to filter results.
@param string $name
@param string $value | [
"Add",
"a",
"query",
"parameter",
"to",
"filter",
"results",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Client.php#L90-L93 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Client.php | Client.databaseCopy | public function databaseCopy($environmentFromUuid, $dbName, $environmentToUuid)
{
$options = [
'form_params' => [
'name' => $dbName,
'source' => $environmentFromUuid,
],
];
return new OperationResponse(
$this->connector->re... | php | public function databaseCopy($environmentFromUuid, $dbName, $environmentToUuid)
{
$options = [
'form_params' => [
'name' => $dbName,
'source' => $environmentFromUuid,
],
];
return new OperationResponse(
$this->connector->re... | [
"public",
"function",
"databaseCopy",
"(",
"$",
"environmentFromUuid",
",",
"$",
"dbName",
",",
"$",
"environmentToUuid",
")",
"{",
"$",
"options",
"=",
"[",
"'form_params'",
"=>",
"[",
"'name'",
"=>",
"$",
"dbName",
",",
"'source'",
"=>",
"$",
"environmentF... | Copies a database from an environment to an environment.
@param string $environmentFromUuid
@param string $dbName
@param string $environmentToUuid
@return OperationResponse | [
"Copies",
"a",
"database",
"from",
"an",
"environment",
"to",
"an",
"environment",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Client.php#L207-L219 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Client.php | Client.databaseCreate | public function databaseCreate($applicationUuid, $name)
{
$options = [
'form_params' => [
'name' => $name,
],
];
return new OperationResponse(
$this->connector->request('post', "/applications/${applicationUuid}/databases", $this->query, $o... | php | public function databaseCreate($applicationUuid, $name)
{
$options = [
'form_params' => [
'name' => $name,
],
];
return new OperationResponse(
$this->connector->request('post', "/applications/${applicationUuid}/databases", $this->query, $o... | [
"public",
"function",
"databaseCreate",
"(",
"$",
"applicationUuid",
",",
"$",
"name",
")",
"{",
"$",
"options",
"=",
"[",
"'form_params'",
"=>",
"[",
"'name'",
"=>",
"$",
"name",
",",
"]",
",",
"]",
";",
"return",
"new",
"OperationResponse",
"(",
"$",
... | Create a new database.
@param string $applicationUuid
@param string $name
@return OperationResponse | [
"Create",
"a",
"new",
"database",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Client.php#L228-L239 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Client.php | Client.databaseBackup | public function databaseBackup($environmentUuid, $dbName, $backupId)
{
return new BackupResponse(
$this->connector->request(
'get',
"/environments/${environmentUuid}/databases/${dbName}/backups/${backupId}",
$this->query
)
);
... | php | public function databaseBackup($environmentUuid, $dbName, $backupId)
{
return new BackupResponse(
$this->connector->request(
'get',
"/environments/${environmentUuid}/databases/${dbName}/backups/${backupId}",
$this->query
)
);
... | [
"public",
"function",
"databaseBackup",
"(",
"$",
"environmentUuid",
",",
"$",
"dbName",
",",
"$",
"backupId",
")",
"{",
"return",
"new",
"BackupResponse",
"(",
"$",
"this",
"->",
"connector",
"->",
"request",
"(",
"'get'",
",",
"\"/environments/${environmentUui... | Gets information about a database backup.
@param string $environmentUuid
@param string $dbName
@param int $backupId
@return BackupResponse | [
"Gets",
"information",
"about",
"a",
"database",
"backup",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Client.php#L299-L308 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Client.php | Client.restoreDatabaseBackup | public function restoreDatabaseBackup($environmentUuid, $dbName, $backupId)
{
return new OperationResponse(
$this->connector->request(
'post',
"/environments/${environmentUuid}/databases/${dbName}/backups/${backupId}/actions/restore",
$this->query
... | php | public function restoreDatabaseBackup($environmentUuid, $dbName, $backupId)
{
return new OperationResponse(
$this->connector->request(
'post',
"/environments/${environmentUuid}/databases/${dbName}/backups/${backupId}/actions/restore",
$this->query
... | [
"public",
"function",
"restoreDatabaseBackup",
"(",
"$",
"environmentUuid",
",",
"$",
"dbName",
",",
"$",
"backupId",
")",
"{",
"return",
"new",
"OperationResponse",
"(",
"$",
"this",
"->",
"connector",
"->",
"request",
"(",
"'post'",
",",
"\"/environments/${env... | Restores a database backup to a database in an environment.
@param string $environmentUuid
@param string $dbName
@param int $backupId
@return OperationResponse | [
"Restores",
"a",
"database",
"backup",
"to",
"a",
"database",
"in",
"an",
"environment",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Client.php#L318-L327 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Client.php | Client.copyFiles | public function copyFiles($environmentUuidFrom, $environmentUuidTo)
{
$options = [
'form_params' => [
'source' => $environmentUuidFrom,
],
];
return new OperationResponse(
$this->connector->request('post', "/environments/${environmentUuidT... | php | public function copyFiles($environmentUuidFrom, $environmentUuidTo)
{
$options = [
'form_params' => [
'source' => $environmentUuidFrom,
],
];
return new OperationResponse(
$this->connector->request('post', "/environments/${environmentUuidT... | [
"public",
"function",
"copyFiles",
"(",
"$",
"environmentUuidFrom",
",",
"$",
"environmentUuidTo",
")",
"{",
"$",
"options",
"=",
"[",
"'form_params'",
"=>",
"[",
"'source'",
"=>",
"$",
"environmentUuidFrom",
",",
"]",
",",
"]",
";",
"return",
"new",
"Operat... | Copies files from an environment to another environment.
@param string $environmentUuidFrom
@param string $environmentUuidTo
@return OperationResponse | [
"Copies",
"files",
"from",
"an",
"environment",
"to",
"another",
"environment",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Client.php#L336-L347 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Client.php | Client.switchCode | public function switchCode($environmentUuid, $branch)
{
$options = [
'form_params' => [
'branch' => $branch,
],
];
return new OperationResponse(
$this->connector->request(
'post',
"/environments/${environme... | php | public function switchCode($environmentUuid, $branch)
{
$options = [
'form_params' => [
'branch' => $branch,
],
];
return new OperationResponse(
$this->connector->request(
'post',
"/environments/${environme... | [
"public",
"function",
"switchCode",
"(",
"$",
"environmentUuid",
",",
"$",
"branch",
")",
"{",
"$",
"options",
"=",
"[",
"'form_params'",
"=>",
"[",
"'branch'",
"=>",
"$",
"branch",
",",
"]",
",",
"]",
";",
"return",
"new",
"OperationResponse",
"(",
"$",... | Deploys a code branch/tag to an environment.
@param string $environmentUuid
@param string $branch
@return OperationResponse | [
"Deploys",
"a",
"code",
"branch",
"/",
"tag",
"to",
"an",
"environment",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Client.php#L356-L373 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Client.php | Client.deployCode | public function deployCode($environmentFromUuid, $environmentToUuid, $commitMessage = null)
{
$options = [
'form_params' => [
'source' => $environmentFromUuid,
'message' => $commitMessage,
],
];
return new OperationResponse(
... | php | public function deployCode($environmentFromUuid, $environmentToUuid, $commitMessage = null)
{
$options = [
'form_params' => [
'source' => $environmentFromUuid,
'message' => $commitMessage,
],
];
return new OperationResponse(
... | [
"public",
"function",
"deployCode",
"(",
"$",
"environmentFromUuid",
",",
"$",
"environmentToUuid",
",",
"$",
"commitMessage",
"=",
"null",
")",
"{",
"$",
"options",
"=",
"[",
"'form_params'",
"=>",
"[",
"'source'",
"=>",
"$",
"environmentFromUuid",
",",
"'mes... | Deploys code from one environment to another environment.
@param string $environmentFromUuid
@param string $environmentToUuid
@param string $commitMessage | [
"Deploys",
"code",
"from",
"one",
"environment",
"to",
"another",
"environment",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Client.php#L382-L400 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Client.php | Client.createDomain | public function createDomain($environmentUuid, $hostname)
{
$options = [
'form_params' => [
'hostname' => $hostname,
],
];
return new OperationResponse(
$this->connector->request('post', "/environments/${environmentUuid}/domains", $this->... | php | public function createDomain($environmentUuid, $hostname)
{
$options = [
'form_params' => [
'hostname' => $hostname,
],
];
return new OperationResponse(
$this->connector->request('post', "/environments/${environmentUuid}/domains", $this->... | [
"public",
"function",
"createDomain",
"(",
"$",
"environmentUuid",
",",
"$",
"hostname",
")",
"{",
"$",
"options",
"=",
"[",
"'form_params'",
"=>",
"[",
"'hostname'",
"=>",
"$",
"hostname",
",",
"]",
",",
"]",
";",
"return",
"new",
"OperationResponse",
"("... | Adds a domain to an environment.
@param string $environmentUuid
@param string $hostname
@return OperationResponse | [
"Adds",
"a",
"domain",
"to",
"an",
"environment",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Client.php#L426-L438 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Client.php | Client.purgeVarnishCache | public function purgeVarnishCache($environmentUuid, array $domains)
{
$options = [
'form_params' => [
'domains' => $domains,
],
];
return new OperationResponse(
$this->connector->request(
'post',
"/environm... | php | public function purgeVarnishCache($environmentUuid, array $domains)
{
$options = [
'form_params' => [
'domains' => $domains,
],
];
return new OperationResponse(
$this->connector->request(
'post',
"/environm... | [
"public",
"function",
"purgeVarnishCache",
"(",
"$",
"environmentUuid",
",",
"array",
"$",
"domains",
")",
"{",
"$",
"options",
"=",
"[",
"'form_params'",
"=>",
"[",
"'domains'",
"=>",
"$",
"domains",
",",
"]",
",",
"]",
";",
"return",
"new",
"OperationRes... | Purges varnish for selected domains in an environment.
@param string $environmentUuid
@param array $domains
@return OperationResponse | [
"Purges",
"varnish",
"for",
"selected",
"domains",
"in",
"an",
"environment",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Client.php#L461-L478 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Client.php | Client.renameEnvironment | public function renameEnvironment($environmentUuid, $label)
{
$options = [
'form_params' => [
'label' => $label,
],
];
return new OperationResponse(
$this->connector->request(
'post',
"/environments/${envir... | php | public function renameEnvironment($environmentUuid, $label)
{
$options = [
'form_params' => [
'label' => $label,
],
];
return new OperationResponse(
$this->connector->request(
'post',
"/environments/${envir... | [
"public",
"function",
"renameEnvironment",
"(",
"$",
"environmentUuid",
",",
"$",
"label",
")",
"{",
"$",
"options",
"=",
"[",
"'form_params'",
"=>",
"[",
"'label'",
"=>",
"$",
"label",
",",
"]",
",",
"]",
";",
"return",
"new",
"OperationResponse",
"(",
... | Renames an environment.
@param string $environmentUuid
@param string $label
@return OperationResponse | [
"Renames",
"an",
"environment",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Client.php#L538-L555 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Client.php | Client.disableLiveDev | public function disableLiveDev($environmentUuid)
{
$options = [
'form_params' => [
'discard' => 1,
],
];
return new OperationResponse(
$this->connector->request(
'post',
"/environments/${environmentUuid}/li... | php | public function disableLiveDev($environmentUuid)
{
$options = [
'form_params' => [
'discard' => 1,
],
];
return new OperationResponse(
$this->connector->request(
'post',
"/environments/${environmentUuid}/li... | [
"public",
"function",
"disableLiveDev",
"(",
"$",
"environmentUuid",
")",
"{",
"$",
"options",
"=",
"[",
"'form_params'",
"=>",
"[",
"'discard'",
"=>",
"1",
",",
"]",
",",
"]",
";",
"return",
"new",
"OperationResponse",
"(",
"$",
"this",
"->",
"connector",... | Disable livedev mode for an environment.
@param string $environmentUuid
@return OperationResponse | [
"Disable",
"livedev",
"mode",
"for",
"an",
"environment",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Client.php#L593-L610 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Client.php | Client.createCron | public function createCron($environmentUuid, $command, $frequency, $label)
{
$options = [
'form_params' => [
'command' => $command,
'frequency' => $frequency,
'label' => $label,
],
];
return new OperationResponse(
... | php | public function createCron($environmentUuid, $command, $frequency, $label)
{
$options = [
'form_params' => [
'command' => $command,
'frequency' => $frequency,
'label' => $label,
],
];
return new OperationResponse(
... | [
"public",
"function",
"createCron",
"(",
"$",
"environmentUuid",
",",
"$",
"command",
",",
"$",
"frequency",
",",
"$",
"label",
")",
"{",
"$",
"options",
"=",
"[",
"'form_params'",
"=>",
"[",
"'command'",
"=>",
"$",
"command",
",",
"'frequency'",
"=>",
"... | Add a cron task.
@param string $environmentUuid
@param string $command
@param string $frequency
@param string $label
@return OperationResponse | [
"Add",
"a",
"cron",
"task",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Client.php#L690-L704 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Client.php | Client.updateRole | public function updateRole($roleUuid, array $permissions)
{
$options = [
'form_params' => [
'permissions' => $permissions,
],
];
return new OperationResponse(
$this->connector->request('put', "/roles/${roleUuid}", $this->query, $options)
... | php | public function updateRole($roleUuid, array $permissions)
{
$options = [
'form_params' => [
'permissions' => $permissions,
],
];
return new OperationResponse(
$this->connector->request('put', "/roles/${roleUuid}", $this->query, $options)
... | [
"public",
"function",
"updateRole",
"(",
"$",
"roleUuid",
",",
"array",
"$",
"permissions",
")",
"{",
"$",
"options",
"=",
"[",
"'form_params'",
"=>",
"[",
"'permissions'",
"=>",
"$",
"permissions",
",",
"]",
",",
"]",
";",
"return",
"new",
"OperationRespo... | Update the permissions associated with a role.
@param string $roleUuid
@param array $permissions
@return OperationResponse | [
"Update",
"the",
"permissions",
"associated",
"with",
"a",
"role",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Client.php#L836-L847 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Client.php | Client.createRole | public function createRole($organizationUuid, $name, array $permissions, $description = null)
{
$options = [
'form_params' => [
'name' => $name,
'permissions' => $permissions,
'description' => $description,
],
];
return... | php | public function createRole($organizationUuid, $name, array $permissions, $description = null)
{
$options = [
'form_params' => [
'name' => $name,
'permissions' => $permissions,
'description' => $description,
],
];
return... | [
"public",
"function",
"createRole",
"(",
"$",
"organizationUuid",
",",
"$",
"name",
",",
"array",
"$",
"permissions",
",",
"$",
"description",
"=",
"null",
")",
"{",
"$",
"options",
"=",
"[",
"'form_params'",
"=>",
"[",
"'name'",
"=>",
"$",
"name",
",",
... | Create a new role.
@param string $organizationUuid
@param string $name
@param array $permissions
@param null|string $description
@return OperationResponse | [
"Create",
"a",
"new",
"role",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Client.php#L858-L871 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Client.php | Client.renameTeam | public function renameTeam($teamUuid, $name)
{
$options = [
'form_params' => [
'name' => $name,
],
];
return new OperationResponse(
$this->connector->request('put', "/teams/${teamUuid}", $options)
);
} | php | public function renameTeam($teamUuid, $name)
{
$options = [
'form_params' => [
'name' => $name,
],
];
return new OperationResponse(
$this->connector->request('put', "/teams/${teamUuid}", $options)
);
} | [
"public",
"function",
"renameTeam",
"(",
"$",
"teamUuid",
",",
"$",
"name",
")",
"{",
"$",
"options",
"=",
"[",
"'form_params'",
"=>",
"[",
"'name'",
"=>",
"$",
"name",
",",
"]",
",",
"]",
";",
"return",
"new",
"OperationResponse",
"(",
"$",
"this",
... | Rename an existing team.
@param string $teamUuid
@param string $name
@return OperationResponse | [
"Rename",
"an",
"existing",
"team",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Client.php#L916-L927 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Client.php | Client.createTeam | public function createTeam($organizationUuid, $name)
{
$options = [
'form_params' => [
'name' => $name,
],
];
return new OperationResponse(
$this->connector->request('post', "/organizations/${organizationUuid}/teams", $this->query, $option... | php | public function createTeam($organizationUuid, $name)
{
$options = [
'form_params' => [
'name' => $name,
],
];
return new OperationResponse(
$this->connector->request('post', "/organizations/${organizationUuid}/teams", $this->query, $option... | [
"public",
"function",
"createTeam",
"(",
"$",
"organizationUuid",
",",
"$",
"name",
")",
"{",
"$",
"options",
"=",
"[",
"'form_params'",
"=>",
"[",
"'name'",
"=>",
"$",
"name",
",",
"]",
",",
"]",
";",
"return",
"new",
"OperationResponse",
"(",
"$",
"t... | Create a new team.
@param string $organizationUuid
@param string $name
@return OperationResponse | [
"Create",
"a",
"new",
"team",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Client.php#L936-L947 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Client.php | Client.addApplicationToTeam | public function addApplicationToTeam($teamUuid, $applicationUuid)
{
$options = [
'form_params' => [
'uuid' => $applicationUuid,
],
];
return new OperationResponse(
$this->connector->request('post', "/teams/${teamUuid}/applications", $this-... | php | public function addApplicationToTeam($teamUuid, $applicationUuid)
{
$options = [
'form_params' => [
'uuid' => $applicationUuid,
],
];
return new OperationResponse(
$this->connector->request('post', "/teams/${teamUuid}/applications", $this-... | [
"public",
"function",
"addApplicationToTeam",
"(",
"$",
"teamUuid",
",",
"$",
"applicationUuid",
")",
"{",
"$",
"options",
"=",
"[",
"'form_params'",
"=>",
"[",
"'uuid'",
"=>",
"$",
"applicationUuid",
",",
"]",
",",
"]",
";",
"return",
"new",
"OperationRespo... | Add an application to a team.
@param string $teamUuid
@param string $applicationUuid
@return OperationResponse | [
"Add",
"an",
"application",
"to",
"a",
"team",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Client.php#L969-L980 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Client.php | Client.createTeamInvite | public function createTeamInvite($teamUuid, $email, $roles)
{
$options = [
'form_params' => [
'email' => $email,
'roles' => $roles
],
];
return new OperationResponse(
$this->connector->request('post', "/teams/${teamUuid}/in... | php | public function createTeamInvite($teamUuid, $email, $roles)
{
$options = [
'form_params' => [
'email' => $email,
'roles' => $roles
],
];
return new OperationResponse(
$this->connector->request('post', "/teams/${teamUuid}/in... | [
"public",
"function",
"createTeamInvite",
"(",
"$",
"teamUuid",
",",
"$",
"email",
",",
"$",
"roles",
")",
"{",
"$",
"options",
"=",
"[",
"'form_params'",
"=>",
"[",
"'email'",
"=>",
"$",
"email",
",",
"'roles'",
"=>",
"$",
"roles",
"]",
",",
"]",
";... | Invites a user to join a team.
@param string $teamUuid
@param string $email
@param array $roles
@return OperationResponse | [
"Invites",
"a",
"user",
"to",
"join",
"a",
"team",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Client.php#L990-L1002 |
typhonius/acquia-php-sdk-v2 | src/CloudApi/Client.php | Client.createOrganizationAdminInvite | public function createOrganizationAdminInvite($organizationUuid, $email)
{
$options = [
'form_params' => [
'email' => $email,
],
];
return new OperationResponse(
$this->connector->request('post', "/teams/${organizationUuid}/invites", $this... | php | public function createOrganizationAdminInvite($organizationUuid, $email)
{
$options = [
'form_params' => [
'email' => $email,
],
];
return new OperationResponse(
$this->connector->request('post', "/teams/${organizationUuid}/invites", $this... | [
"public",
"function",
"createOrganizationAdminInvite",
"(",
"$",
"organizationUuid",
",",
"$",
"email",
")",
"{",
"$",
"options",
"=",
"[",
"'form_params'",
"=>",
"[",
"'email'",
"=>",
"$",
"email",
",",
"]",
",",
"]",
";",
"return",
"new",
"OperationRespons... | Invites a user to become admin of an organization.
@param string $organizationUuid
@param string $email
@return OperationResponse | [
"Invites",
"a",
"user",
"to",
"become",
"admin",
"of",
"an",
"organization",
"."
] | train | https://github.com/typhonius/acquia-php-sdk-v2/blob/d7a3349052dd26e85f60a7a002118d0afd70c8a5/src/CloudApi/Client.php#L1011-L1022 |
Waavi/url-shortener | src/Drivers/BaseDriver.php | BaseDriver.shorten | public function shorten($url)
{
$link = new Link;
$link->setLongUrl($url);
$this->provider->shorten($link);
return $link->getShortUrl();
} | php | public function shorten($url)
{
$link = new Link;
$link->setLongUrl($url);
$this->provider->shorten($link);
return $link->getShortUrl();
} | [
"public",
"function",
"shorten",
"(",
"$",
"url",
")",
"{",
"$",
"link",
"=",
"new",
"Link",
";",
"$",
"link",
"->",
"setLongUrl",
"(",
"$",
"url",
")",
";",
"$",
"this",
"->",
"provider",
"->",
"shorten",
"(",
"$",
"link",
")",
";",
"return",
"$... | Shorten the given url
@param string $url
@throws \Guzzle\Http\Exception\BadResponseException
@throws \Mremi\UrlShortener\Exception\InvalidApiResponseException
@return string | [
"Shorten",
"the",
"given",
"url"
] | train | https://github.com/Waavi/url-shortener/blob/15301d166765681929e1bdc25eb2c1e01d416f31/src/Drivers/BaseDriver.php#L24-L30 |
Waavi/url-shortener | src/Drivers/BaseDriver.php | BaseDriver.expand | public function expand($url)
{
$link = new Link;
$link->setShortUrl($url);
$this->provider->expand($link);
return $link->getLongUrl();
} | php | public function expand($url)
{
$link = new Link;
$link->setShortUrl($url);
$this->provider->expand($link);
return $link->getLongUrl();
} | [
"public",
"function",
"expand",
"(",
"$",
"url",
")",
"{",
"$",
"link",
"=",
"new",
"Link",
";",
"$",
"link",
"->",
"setShortUrl",
"(",
"$",
"url",
")",
";",
"$",
"this",
"->",
"provider",
"->",
"expand",
"(",
"$",
"link",
")",
";",
"return",
"$"... | Expand the given url
@param string $url
@throws \Guzzle\Http\Exception\BadResponseException
@throws \Mremi\UrlShortener\Exception\InvalidApiResponseException
@return string | [
"Expand",
"the",
"given",
"url"
] | train | https://github.com/Waavi/url-shortener/blob/15301d166765681929e1bdc25eb2c1e01d416f31/src/Drivers/BaseDriver.php#L40-L46 |
Waavi/url-shortener | src/UrlShortener.php | UrlShortener.driver | public function driver($driverName)
{
$shortener = new UrlShortener($this->driverFactory);
$shortener->setDriver($driverName);
return $shortener;
} | php | public function driver($driverName)
{
$shortener = new UrlShortener($this->driverFactory);
$shortener->setDriver($driverName);
return $shortener;
} | [
"public",
"function",
"driver",
"(",
"$",
"driverName",
")",
"{",
"$",
"shortener",
"=",
"new",
"UrlShortener",
"(",
"$",
"this",
"->",
"driverFactory",
")",
";",
"$",
"shortener",
"->",
"setDriver",
"(",
"$",
"driverName",
")",
";",
"return",
"$",
"shor... | Creates a new URL Shortener instance with the given driver name.
Useful for chained calls using the facade when a different driver is to be used for just one request.
@param string $driverName
@return UrlShortener | [
"Creates",
"a",
"new",
"URL",
"Shortener",
"instance",
"with",
"the",
"given",
"driver",
"name",
".",
"Useful",
"for",
"chained",
"calls",
"using",
"the",
"facade",
"when",
"a",
"different",
"driver",
"is",
"to",
"be",
"used",
"for",
"just",
"one",
"reques... | train | https://github.com/Waavi/url-shortener/blob/15301d166765681929e1bdc25eb2c1e01d416f31/src/UrlShortener.php#L40-L45 |
Waavi/url-shortener | src/UrlShortener.php | UrlShortener.expand | public function expand($url)
{
try {
return $this->driver->expand($url);
} catch (BadResponseException $e) {
throw new Exceptions\InvalidResponseException($e->getMessage());
} catch (InvalidApiResponseException $e) {
throw new Exceptions\InvalidResponseExc... | php | public function expand($url)
{
try {
return $this->driver->expand($url);
} catch (BadResponseException $e) {
throw new Exceptions\InvalidResponseException($e->getMessage());
} catch (InvalidApiResponseException $e) {
throw new Exceptions\InvalidResponseExc... | [
"public",
"function",
"expand",
"(",
"$",
"url",
")",
"{",
"try",
"{",
"return",
"$",
"this",
"->",
"driver",
"->",
"expand",
"(",
"$",
"url",
")",
";",
"}",
"catch",
"(",
"BadResponseException",
"$",
"e",
")",
"{",
"throw",
"new",
"Exceptions",
"\\"... | Expand the given url
@param string $url
@throws InvalidResponseException
@return string | [
"Expand",
"the",
"given",
"url"
] | train | https://github.com/Waavi/url-shortener/blob/15301d166765681929e1bdc25eb2c1e01d416f31/src/UrlShortener.php#L72-L81 |
Waavi/url-shortener | src/Drivers/Factory.php | Factory.make | public function make($driverName)
{
$driverName = trim(strtolower($driverName));
switch ($driverName) {
case 'google':
return $this->google;
case 'bitly':
return $this->bitly;
default:
throw new InvalidArgumentExcept... | php | public function make($driverName)
{
$driverName = trim(strtolower($driverName));
switch ($driverName) {
case 'google':
return $this->google;
case 'bitly':
return $this->bitly;
default:
throw new InvalidArgumentExcept... | [
"public",
"function",
"make",
"(",
"$",
"driverName",
")",
"{",
"$",
"driverName",
"=",
"trim",
"(",
"strtolower",
"(",
"$",
"driverName",
")",
")",
";",
"switch",
"(",
"$",
"driverName",
")",
"{",
"case",
"'google'",
":",
"return",
"$",
"this",
"->",
... | Create a new Url Shortener driver instance based on its name
@param string $driverName google|bitly
@throws InvalidArgumentException
@return DriverInterface | [
"Create",
"a",
"new",
"Url",
"Shortener",
"driver",
"instance",
"based",
"on",
"its",
"name"
] | train | https://github.com/Waavi/url-shortener/blob/15301d166765681929e1bdc25eb2c1e01d416f31/src/Drivers/Factory.php#L49-L60 |
Waavi/url-shortener | src/UrlShortenerServiceProvider.php | UrlShortenerServiceProvider.register | public function register()
{
$this->app->singleton('urlshortener.factory', Drivers\Factory::class);
$this->app->singleton('urlshortener', function ($app) {
$shortener = new UrlShortener($app['urlshortener.factory']);
$shortener->setDriver($app['config']->get('urlshortener.dri... | php | public function register()
{
$this->app->singleton('urlshortener.factory', Drivers\Factory::class);
$this->app->singleton('urlshortener', function ($app) {
$shortener = new UrlShortener($app['urlshortener.factory']);
$shortener->setDriver($app['config']->get('urlshortener.dri... | [
"public",
"function",
"register",
"(",
")",
"{",
"$",
"this",
"->",
"app",
"->",
"singleton",
"(",
"'urlshortener.factory'",
",",
"Drivers",
"\\",
"Factory",
"::",
"class",
")",
";",
"$",
"this",
"->",
"app",
"->",
"singleton",
"(",
"'urlshortener'",
",",
... | Register the service provider.
@return void | [
"Register",
"the",
"service",
"provider",
"."
] | train | https://github.com/Waavi/url-shortener/blob/15301d166765681929e1bdc25eb2c1e01d416f31/src/UrlShortenerServiceProvider.php#L36-L44 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.iCanSee | public function iCanSee( $id )
{
trigger_error(
"iCanSee is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
$element = null;
$session = $this->getSession();
for ($i = 0; $i < 15; $i++) {
if ($element = $session-... | php | public function iCanSee( $id )
{
trigger_error(
"iCanSee is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
$element = null;
$session = $this->getSession();
for ($i = 0; $i < 15; $i++) {
if ($element = $session-... | [
"public",
"function",
"iCanSee",
"(",
"$",
"id",
")",
"{",
"trigger_error",
"(",
"\"iCanSee is deprecated since v6.3.0 and will be removed in v7.0.0\"",
",",
"E_USER_DEPRECATED",
")",
";",
"$",
"element",
"=",
"null",
";",
"$",
"session",
"=",
"$",
"this",
"->",
"... | @Given I see :id (link/button/form)
@When I can see :id (link/button/form)
A "spin function" sentence to wait for a given element to appear.
Waits maximum 3 seconds, tries every 200ms
@link http://docs.behat.org/en/v2.5/cookbook/using_spin_functions.html
@deprecated deprecated since version 6.3.0 | [
"@Given",
"I",
"see",
":",
"id",
"(",
"link",
"/",
"button",
"/",
"form",
")",
"@When",
"I",
"can",
"see",
":",
"id",
"(",
"link",
"/",
"button",
"/",
"form",
")"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L47-L64 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.fillFieldWithValue | public function fillFieldWithValue( $field, $value = '' )
{
trigger_error(
"fillFieldWithValue is deprecated since v6.3.0, use PlatformUI Context fillFieldWithValue instead",
E_USER_DEPRECATED
);
$this->getSession()->getPage()->fillField( $field, $value );
} | php | public function fillFieldWithValue( $field, $value = '' )
{
trigger_error(
"fillFieldWithValue is deprecated since v6.3.0, use PlatformUI Context fillFieldWithValue instead",
E_USER_DEPRECATED
);
$this->getSession()->getPage()->fillField( $field, $value );
} | [
"public",
"function",
"fillFieldWithValue",
"(",
"$",
"field",
",",
"$",
"value",
"=",
"''",
")",
"{",
"trigger_error",
"(",
"\"fillFieldWithValue is deprecated since v6.3.0, use PlatformUI Context fillFieldWithValue instead\"",
",",
"E_USER_DEPRECATED",
")",
";",
"$",
"thi... | @When I fill in :field with :value
@When I set :field as empty
Fill field identified by ':field' with ':value'
@deprecated deprecated since version 6.3.0 | [
"@When",
"I",
"fill",
"in",
":",
"field",
"with",
":",
"value",
"@When",
"I",
"set",
":",
"field",
"as",
"empty"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L132-L139 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.iShouldBeOnPage | public function iShouldBeOnPage( $pageIdentifier = 'home' )
{
$currentUrl = $this->getUrlWithoutQueryString( $this->getSession()->getCurrentUrl() );
$expectedUrl = $this->locatePath( $this->getPathByPageIdentifier( $pageIdentifier ) );
Assertion::assertEquals(
$expectedUrl,
... | php | public function iShouldBeOnPage( $pageIdentifier = 'home' )
{
$currentUrl = $this->getUrlWithoutQueryString( $this->getSession()->getCurrentUrl() );
$expectedUrl = $this->locatePath( $this->getPathByPageIdentifier( $pageIdentifier ) );
Assertion::assertEquals(
$expectedUrl,
... | [
"public",
"function",
"iShouldBeOnPage",
"(",
"$",
"pageIdentifier",
"=",
"'home'",
")",
"{",
"$",
"currentUrl",
"=",
"$",
"this",
"->",
"getUrlWithoutQueryString",
"(",
"$",
"this",
"->",
"getSession",
"(",
")",
"->",
"getCurrentUrl",
"(",
")",
")",
";",
... | @Then I should be at/on (the) homepage
@Then I should be at/on (the) :page page
Asserts that the current page is the one identified by ':page', or the homepage. | [
"@Then",
"I",
"should",
"be",
"at",
"/",
"on",
"(",
"the",
")",
"homepage",
"@Then",
"I",
"should",
"be",
"at",
"/",
"on",
"(",
"the",
")",
":",
"page",
"page"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L147-L158 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.onPageSectionIClickAtButton | public function onPageSectionIClickAtButton( $button, $pageSection = null )
{
trigger_error(
"onPageSectionIClickAtButton is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
$base = $this->makeXpathForBlock( $pageSection );
$el = $t... | php | public function onPageSectionIClickAtButton( $button, $pageSection = null )
{
trigger_error(
"onPageSectionIClickAtButton is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
$base = $this->makeXpathForBlock( $pageSection );
$el = $t... | [
"public",
"function",
"onPageSectionIClickAtButton",
"(",
"$",
"button",
",",
"$",
"pageSection",
"=",
"null",
")",
"{",
"trigger_error",
"(",
"\"onPageSectionIClickAtButton is deprecated since v6.3.0 and will be removed in v7.0.0\"",
",",
"E_USER_DEPRECATED",
")",
";",
"$",
... | @Given on :pageSection I clicked at/on :button button
@When on :pageSection I click at/on :button button
Clicks the button identified by ':button', located in section ':section'
@deprecated deprecated since version 6.3.0 | [
"@Given",
"on",
":",
"pageSection",
"I",
"clicked",
"at",
"/",
"on",
":",
"button",
"button",
"@When",
"on",
":",
"pageSection",
"I",
"click",
"at",
"/",
"on",
":",
"button",
"button"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L185-L195 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.onPageSectionIClickAtLink | public function onPageSectionIClickAtLink( $link, $pageSection = null )
{
trigger_error(
"onPageSectionIClickAtLink is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
$base = $this->makeXpathForBlock( $pageSection );
$el = $this->g... | php | public function onPageSectionIClickAtLink( $link, $pageSection = null )
{
trigger_error(
"onPageSectionIClickAtLink is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
$base = $this->makeXpathForBlock( $pageSection );
$el = $this->g... | [
"public",
"function",
"onPageSectionIClickAtLink",
"(",
"$",
"link",
",",
"$",
"pageSection",
"=",
"null",
")",
"{",
"trigger_error",
"(",
"\"onPageSectionIClickAtLink is deprecated since v6.3.0 and will be removed in v7.0.0\"",
",",
"E_USER_DEPRECATED",
")",
";",
"$",
"bas... | @Given on :pageSection I clicked on/at link link
@When on :pageSection I click on/at :link link
Click a link with text ':link' on page section ':pageSection'
Asserts that at least one link element is found.
@deprecated deprecated since version 6.3.0 | [
"@Given",
"on",
":",
"pageSection",
"I",
"clicked",
"on",
"/",
"at",
"link",
"link",
"@When",
"on",
":",
"pageSection",
"I",
"click",
"on",
"/",
"at",
":",
"link",
"link"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L223-L233 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.checkOption | public function checkOption( $option )
{
trigger_error(
"checkOption is deprecated since v6.3.0, use PlatformUI Context checkOption instead",
E_USER_DEPRECATED
);
$fieldElements = $this->getXpath()->findFields( $option );
EzAssertion::assertElementFound( $opti... | php | public function checkOption( $option )
{
trigger_error(
"checkOption is deprecated since v6.3.0, use PlatformUI Context checkOption instead",
E_USER_DEPRECATED
);
$fieldElements = $this->getXpath()->findFields( $option );
EzAssertion::assertElementFound( $opti... | [
"public",
"function",
"checkOption",
"(",
"$",
"option",
")",
"{",
"trigger_error",
"(",
"\"checkOption is deprecated since v6.3.0, use PlatformUI Context checkOption instead\"",
",",
"E_USER_DEPRECATED",
")",
";",
"$",
"fieldElements",
"=",
"$",
"this",
"->",
"getXpath",
... | @Given I checked :label checkbox
@When I check :label checkbox
Toggles the value for the checkbox with name ':label'
@deprecated deprecated since version 6.3.0 | [
"@Given",
"I",
"checked",
":",
"label",
"checkbox",
"@When",
"I",
"check",
":",
"label",
"checkbox"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L243-L263 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.iSelect | public function iSelect( $option )
{
trigger_error(
"iSelect is deprecated since v6.3.0, use PlatformUI Context iSelect instead",
E_USER_DEPRECATED
);
$elements = $this->getXpath()->findXpath( "//select" );
Assertion::assertNotEmpty( $elements, "Unable to find... | php | public function iSelect( $option )
{
trigger_error(
"iSelect is deprecated since v6.3.0, use PlatformUI Context iSelect instead",
E_USER_DEPRECATED
);
$elements = $this->getXpath()->findXpath( "//select" );
Assertion::assertNotEmpty( $elements, "Unable to find... | [
"public",
"function",
"iSelect",
"(",
"$",
"option",
")",
"{",
"trigger_error",
"(",
"\"iSelect is deprecated since v6.3.0, use PlatformUI Context iSelect instead\"",
",",
"E_USER_DEPRECATED",
")",
";",
"$",
"elements",
"=",
"$",
"this",
"->",
"getXpath",
"(",
")",
"-... | @When I select :option
Selects option with value ':value'
IMPORTANT: Will thrown an error if more than 1 select/dropdown is found on page
@deprecated deprecated since version 6.3.0 | [
"@When",
"I",
"select",
":",
"option"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L273-L282 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.iSelectRadioButton | public function iSelectRadioButton( $label )
{
trigger_error(
"iSelectRadioButton is deprecated since v6.3.0, use PlatformUI Context iSelectRadioButton instead",
E_USER_DEPRECATED
);
$el = $this->getSession()->getPage()->findField( $label );
Assertion::assertN... | php | public function iSelectRadioButton( $label )
{
trigger_error(
"iSelectRadioButton is deprecated since v6.3.0, use PlatformUI Context iSelectRadioButton instead",
E_USER_DEPRECATED
);
$el = $this->getSession()->getPage()->findField( $label );
Assertion::assertN... | [
"public",
"function",
"iSelectRadioButton",
"(",
"$",
"label",
")",
"{",
"trigger_error",
"(",
"\"iSelectRadioButton is deprecated since v6.3.0, use PlatformUI Context iSelectRadioButton instead\"",
",",
"E_USER_DEPRECATED",
")",
";",
"$",
"el",
"=",
"$",
"this",
"->",
"get... | @Given I selected :label radio button
@When I select :label radio button
Selects the radio button with label ':label'
@deprecated deprecated since version 6.3.0 | [
"@Given",
"I",
"selected",
":",
"label",
"radio",
"button",
"@When",
"I",
"select",
":",
"label",
"radio",
"button"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L292-L301 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.iFillFormWith | public function iFillFormWith( TableNode $table )
{
trigger_error(
"onPageSectionIClickAtLink is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
foreach ( GherkinHelper::convertTableToArrayOfData( $table ) as $field => $value )
{
... | php | public function iFillFormWith( TableNode $table )
{
trigger_error(
"onPageSectionIClickAtLink is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
foreach ( GherkinHelper::convertTableToArrayOfData( $table ) as $field => $value )
{
... | [
"public",
"function",
"iFillFormWith",
"(",
"TableNode",
"$",
"table",
")",
"{",
"trigger_error",
"(",
"\"onPageSectionIClickAtLink is deprecated since v6.3.0 and will be removed in v7.0.0\"",
",",
"E_USER_DEPRECATED",
")",
";",
"foreach",
"(",
"GherkinHelper",
"::",
"convert... | @Given I filled form with:
@When I fill form with:
Fills a form with the provided field/value pairs:
| field | value |
| Title | A title text |
| Content | Some content |
@deprecated deprecated since version 6.3.0 | [
"@Given",
"I",
"filled",
"form",
"with",
":",
"@When",
"I",
"fill",
"form",
"with",
":"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L314-L327 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.formHasValue | public function formHasValue( TableNode $table )
{
trigger_error(
"onPageSectionIClickAtLink is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
foreach ( GherkinHelper::convertTableToArrayOfData( $table ) as $field => $value )
{
... | php | public function formHasValue( TableNode $table )
{
trigger_error(
"onPageSectionIClickAtLink is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
foreach ( GherkinHelper::convertTableToArrayOfData( $table ) as $field => $value )
{
... | [
"public",
"function",
"formHasValue",
"(",
"TableNode",
"$",
"table",
")",
"{",
"trigger_error",
"(",
"\"onPageSectionIClickAtLink is deprecated since v6.3.0 and will be removed in v7.0.0\"",
",",
"E_USER_DEPRECATED",
")",
";",
"foreach",
"(",
"GherkinHelper",
"::",
"convertT... | @Then I see field with value:
Checks a form for the provided field/value pairs:
| field | value |
| Title | A title text |
| Content | Some content |
@deprecated deprecated since version 6.3.0 | [
"@Then",
"I",
"see",
"field",
"with",
"value",
":"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L339-L352 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.onPageSectionISeeLinks | public function onPageSectionISeeLinks( TableNode $table, $pageSection = null )
{
trigger_error(
"iSeeLinks is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
$rows = $table->getRows();
array_shift( $rows );
foreach ( $ro... | php | public function onPageSectionISeeLinks( TableNode $table, $pageSection = null )
{
trigger_error(
"iSeeLinks is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
$rows = $table->getRows();
array_shift( $rows );
foreach ( $ro... | [
"public",
"function",
"onPageSectionISeeLinks",
"(",
"TableNode",
"$",
"table",
",",
"$",
"pageSection",
"=",
"null",
")",
"{",
"trigger_error",
"(",
"\"iSeeLinks is deprecated since v6.3.0 and will be removed in v7.0.0\"",
",",
"E_USER_DEPRECATED",
")",
";",
"$",
"rows",... | @Then on :pageSection I (should) see (the) (following) links:
@deprecated deprecated since version 6.3.0 | [
"@Then",
"on",
":",
"pageSection",
"I",
"(",
"should",
")",
"see",
"(",
"the",
")",
"(",
"following",
")",
"links",
":"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L379-L396 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.iSeeLinksInFollowingOrder | public function iSeeLinksInFollowingOrder( TableNode $table )
{
trigger_error(
"iSeeLinksInFollowingOrder is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
// get all links
$available = $this->getXpath()->findXpath( "//a[@href]" ... | php | public function iSeeLinksInFollowingOrder( TableNode $table )
{
trigger_error(
"iSeeLinksInFollowingOrder is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
// get all links
$available = $this->getXpath()->findXpath( "//a[@href]" ... | [
"public",
"function",
"iSeeLinksInFollowingOrder",
"(",
"TableNode",
"$",
"table",
")",
"{",
"trigger_error",
"(",
"\"iSeeLinksInFollowingOrder is deprecated since v6.3.0 and will be removed in v7.0.0\"",
",",
"E_USER_DEPRECATED",
")",
";",
"// get all links",
"$",
"available",
... | @Then I (should) see (the) links in the following order:
@Then I (should) see (the) links in this order:
Checks if links exist, and appear in the specified order
@deprecated deprecated since version 6.3.0 | [
"@Then",
"I",
"(",
"should",
")",
"see",
"(",
"the",
")",
"links",
"in",
"the",
"following",
"order",
":",
"@Then",
"I",
"(",
"should",
")",
"see",
"(",
"the",
")",
"links",
"in",
"this",
"order",
":"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L448-L470 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.iSeeFollowingLinksIn | public function iSeeFollowingLinksIn( TableNode $table )
{
trigger_error(
"iSeeFollowingLinksIn is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
$session = $this->getSession();
$rows = $table->getRows();
array_shift( $ro... | php | public function iSeeFollowingLinksIn( TableNode $table )
{
trigger_error(
"iSeeFollowingLinksIn is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
$session = $this->getSession();
$rows = $table->getRows();
array_shift( $ro... | [
"public",
"function",
"iSeeFollowingLinksIn",
"(",
"TableNode",
"$",
"table",
")",
"{",
"trigger_error",
"(",
"\"iSeeFollowingLinksIn is deprecated since v6.3.0 and will be removed in v7.0.0\"",
",",
"E_USER_DEPRECATED",
")",
";",
"$",
"session",
"=",
"$",
"this",
"->",
"... | @Then I (should) see (the) (following) links in:
Example: this is used to see in tag cloud which tags have more results
| link | tag |
| link1 | title |
| link2 | list |
| link3 | text |
@deprecated deprecated since version 6.3.0 | [
"@Then",
"I",
"(",
"should",
")",
"see",
"(",
"the",
")",
"(",
"following",
")",
"links",
"in",
":"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L483-L516 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.iSeeTitle | public function iSeeTitle( $title )
{
trigger_error(
"iSeeTitle is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
$literal = $this->getXpath()->literal( $title );
$tags = $this->getTagsFor( "title" );
$innerXpath = "[text(... | php | public function iSeeTitle( $title )
{
trigger_error(
"iSeeTitle is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
$literal = $this->getXpath()->literal( $title );
$tags = $this->getTagsFor( "title" );
$innerXpath = "[text(... | [
"public",
"function",
"iSeeTitle",
"(",
"$",
"title",
")",
"{",
"trigger_error",
"(",
"\"iSeeTitle is deprecated since v6.3.0 and will be removed in v7.0.0\"",
",",
"E_USER_DEPRECATED",
")",
";",
"$",
"literal",
"=",
"$",
"this",
"->",
"getXpath",
"(",
")",
"->",
"l... | @Then I (should) see :title title/topic
Asserts that a (single) title element exists with the text ':title'
@deprecated deprecated since version 6.3.0 | [
"@Then",
"I",
"(",
"should",
")",
"see",
":",
"title",
"title",
"/",
"topic"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L525-L548 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.iSeeTableWith | public function iSeeTableWith( TableNode $table )
{
trigger_error(
"iSeeTableWith is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
$rows = $table->getRows();
$headers = array_shift( $rows );
$max = count( $headers );
... | php | public function iSeeTableWith( TableNode $table )
{
trigger_error(
"iSeeTableWith is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
$rows = $table->getRows();
$headers = array_shift( $rows );
$max = count( $headers );
... | [
"public",
"function",
"iSeeTableWith",
"(",
"TableNode",
"$",
"table",
")",
"{",
"trigger_error",
"(",
"\"iSeeTableWith is deprecated since v6.3.0 and will be removed in v7.0.0\"",
",",
"E_USER_DEPRECATED",
")",
";",
"$",
"rows",
"=",
"$",
"table",
"->",
"getRows",
"(",... | @Then I (should) see table with:
Asserts that a table exists with specified values.
The table header needs to have the number of the column to which the values belong,
all the other text is optional, normaly using 'Column' for easier understanding:
| Column 1 | Column 2 | Column 4 |
| Value A | Value B | Value D |... | [
"@Then",
"I",
"(",
"should",
")",
"see",
"table",
"with",
":"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L564-L593 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.onPageSectionISeeTextEmphasized | public function onPageSectionISeeTextEmphasized( $text, $pageSection = null )
{
trigger_error(
"onPageSectionISeeTextEmphasized is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
// first find the text
$base = $this->makeXpathForBl... | php | public function onPageSectionISeeTextEmphasized( $text, $pageSection = null )
{
trigger_error(
"onPageSectionISeeTextEmphasized is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
// first find the text
$base = $this->makeXpathForBl... | [
"public",
"function",
"onPageSectionISeeTextEmphasized",
"(",
"$",
"text",
",",
"$",
"pageSection",
"=",
"null",
")",
"{",
"trigger_error",
"(",
"\"onPageSectionISeeTextEmphasized is deprecated since v6.3.0 and will be removed in v7.0.0\"",
",",
"E_USER_DEPRECATED",
")",
";",
... | @Then on :pageSection I (should) see the :text text emphasized
@deprecated deprecated since version 6.3.0 | [
"@Then",
"on",
":",
"pageSection",
"I",
"(",
"should",
")",
"see",
"the",
":",
"text",
"text",
"emphasized"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L616-L633 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.iSeeWarning | public function iSeeWarning( $message )
{
trigger_error(
"iSeeWarning is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
$el = $this->getXpath()->findXpath(
"//*[contains( @class, 'warning' ) or contains( @class, 'error' )]"
... | php | public function iSeeWarning( $message )
{
trigger_error(
"iSeeWarning is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
$el = $this->getXpath()->findXpath(
"//*[contains( @class, 'warning' ) or contains( @class, 'error' )]"
... | [
"public",
"function",
"iSeeWarning",
"(",
"$",
"message",
")",
"{",
"trigger_error",
"(",
"\"iSeeWarning is deprecated since v6.3.0 and will be removed in v7.0.0\"",
",",
"E_USER_DEPRECATED",
")",
";",
"$",
"el",
"=",
"$",
"this",
"->",
"getXpath",
"(",
")",
"->",
"... | @Then I (should) see :message warning/error
Checks that an element with the class 'warning' or 'error' exists with text ':message'
@deprecated deprecated since version 6.3.0 | [
"@Then",
"I",
"(",
"should",
")",
"see",
":",
"message",
"warning",
"/",
"error"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L642-L654 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.onPageSectionISeeText | public function onPageSectionISeeText( $text, $pageSection = null )
{
trigger_error(
"onPageSectionISeeText is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
$base = $this->makeXpathForBlock( $pageSection );
$literal = $this->ge... | php | public function onPageSectionISeeText( $text, $pageSection = null )
{
trigger_error(
"onPageSectionISeeText is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
$base = $this->makeXpathForBlock( $pageSection );
$literal = $this->ge... | [
"public",
"function",
"onPageSectionISeeText",
"(",
"$",
"text",
",",
"$",
"pageSection",
"=",
"null",
")",
"{",
"trigger_error",
"(",
"\"onPageSectionISeeText is deprecated since v6.3.0 and will be removed in v7.0.0\"",
",",
"E_USER_DEPRECATED",
")",
";",
"$",
"base",
"=... | @Then on :pageSection I (should) see the exact :text message/text
@deprecated deprecated since version 6.3.0 | [
"@Then",
"on",
":",
"pageSection",
"I",
"(",
"should",
")",
"see",
"the",
"exact",
":",
"text",
"message",
"/",
"text"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L677-L691 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.iSeeMessage | public function iSeeMessage( $text )
{
trigger_error(
"iSeeMessage is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
$this->checkForExceptions();
$this->assertSession()->pageTextContains( $text );
} | php | public function iSeeMessage( $text )
{
trigger_error(
"iSeeMessage is deprecated since v6.3.0 and will be removed in v7.0.0",
E_USER_DEPRECATED
);
$this->checkForExceptions();
$this->assertSession()->pageTextContains( $text );
} | [
"public",
"function",
"iSeeMessage",
"(",
"$",
"text",
")",
"{",
"trigger_error",
"(",
"\"iSeeMessage is deprecated since v6.3.0 and will be removed in v7.0.0\"",
",",
"E_USER_DEPRECATED",
")",
";",
"$",
"this",
"->",
"checkForExceptions",
"(",
")",
";",
"$",
"this",
... | @Then I (should) see :message message/text
Checks that current page contains text.
@deprecated deprecated since version 6.3.0 | [
"@Then",
"I",
"(",
"should",
")",
"see",
":",
"message",
"message",
"/",
"text"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L700-L708 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.isCheckedOption | public function isCheckedOption( $label )
{
trigger_error(
"isCheckedOption is deprecated since v6.3.0, use PlatformUI Context isCheckedOption instead",
E_USER_DEPRECATED
);
$isChecked = $this->getCheckboxChecked( $label );
Assertion::assertTrue( $isChecked, "... | php | public function isCheckedOption( $label )
{
trigger_error(
"isCheckedOption is deprecated since v6.3.0, use PlatformUI Context isCheckedOption instead",
E_USER_DEPRECATED
);
$isChecked = $this->getCheckboxChecked( $label );
Assertion::assertTrue( $isChecked, "... | [
"public",
"function",
"isCheckedOption",
"(",
"$",
"label",
")",
"{",
"trigger_error",
"(",
"\"isCheckedOption is deprecated since v6.3.0, use PlatformUI Context isCheckedOption instead\"",
",",
"E_USER_DEPRECATED",
")",
";",
"$",
"isChecked",
"=",
"$",
"this",
"->",
"getCh... | @Then the checkbox :label should be checked
@deprecated deprecated since version 6.3.0 | [
"@Then",
"the",
"checkbox",
":",
"label",
"should",
"be",
"checked"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L732-L740 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.isNotCheckedOption | public function isNotCheckedOption( $label )
{
trigger_error(
"isNotCheckedOption is deprecated since v6.3.0, use PlatformUI Context isNotCheckedOption instead",
E_USER_DEPRECATED
);
$isChecked = $this->getCheckboxChecked( $label );
Assertion::assertFalse( $is... | php | public function isNotCheckedOption( $label )
{
trigger_error(
"isNotCheckedOption is deprecated since v6.3.0, use PlatformUI Context isNotCheckedOption instead",
E_USER_DEPRECATED
);
$isChecked = $this->getCheckboxChecked( $label );
Assertion::assertFalse( $is... | [
"public",
"function",
"isNotCheckedOption",
"(",
"$",
"label",
")",
"{",
"trigger_error",
"(",
"\"isNotCheckedOption is deprecated since v6.3.0, use PlatformUI Context isNotCheckedOption instead\"",
",",
"E_USER_DEPRECATED",
")",
";",
"$",
"isChecked",
"=",
"$",
"this",
"->",... | @Then the checkbox :label should not be checked
@deprecated deprecated since version 6.3.0 | [
"@Then",
"the",
"checkbox",
":",
"label",
"should",
"not",
"be",
"checked"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L747-L755 |
ezsystems/BehatBundle | Context/Browser/SubContext/CommonActions.php | CommonActions.getCheckboxChecked | private function getCheckboxChecked( $option )
{
$fieldElements = $this->getXpath()->findFields( $option );
EzAssertion::assertElementFound( $option, $fieldElements, null, 'checkbox' );
// this is needed for the cases where are checkboxes and radio's
// side by side, for main option... | php | private function getCheckboxChecked( $option )
{
$fieldElements = $this->getXpath()->findFields( $option );
EzAssertion::assertElementFound( $option, $fieldElements, null, 'checkbox' );
// this is needed for the cases where are checkboxes and radio's
// side by side, for main option... | [
"private",
"function",
"getCheckboxChecked",
"(",
"$",
"option",
")",
"{",
"$",
"fieldElements",
"=",
"$",
"this",
"->",
"getXpath",
"(",
")",
"->",
"findFields",
"(",
"$",
"option",
")",
";",
"EzAssertion",
"::",
"assertElementFound",
"(",
"$",
"option",
... | Helper for checkbox | [
"Helper",
"for",
"checkbox"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Browser/SubContext/CommonActions.php#L760-L776 |
ezsystems/BehatBundle | ObjectManager/BasicContent.php | BasicContent.createContent | public function createContent( $contentType, $fields, $parentLocationId )
{
$repository = $this->getRepository();
$languageCode = self::DEFAULT_LANGUAGE;
$content = $this->getRepository()->sudo(
function(Repository $repository) use ( $parentLocationId, $contentType, $fields, $la... | php | public function createContent( $contentType, $fields, $parentLocationId )
{
$repository = $this->getRepository();
$languageCode = self::DEFAULT_LANGUAGE;
$content = $this->getRepository()->sudo(
function(Repository $repository) use ( $parentLocationId, $contentType, $fields, $la... | [
"public",
"function",
"createContent",
"(",
"$",
"contentType",
",",
"$",
"fields",
",",
"$",
"parentLocationId",
")",
"{",
"$",
"repository",
"=",
"$",
"this",
"->",
"getRepository",
"(",
")",
";",
"$",
"languageCode",
"=",
"self",
"::",
"DEFAULT_LANGUAGE",... | Creates and publishes a Content.
@param string $contentType
@param array $fields
@param mixxed $parentLocationId
@return mixed The content's main location id | [
"Creates",
"and",
"publishes",
"a",
"Content",
"."
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/ObjectManager/BasicContent.php#L40-L54 |
ezsystems/BehatBundle | ObjectManager/BasicContent.php | BasicContent.publishDraft | public function publishDraft( Content $content )
{
$this->getRepository()->sudo(
function(Repository $repository) use ( $content )
{
$repository->getContentService()->publishVersion($content->versionInfo->id);
}
);
} | php | public function publishDraft( Content $content )
{
$this->getRepository()->sudo(
function(Repository $repository) use ( $content )
{
$repository->getContentService()->publishVersion($content->versionInfo->id);
}
);
} | [
"public",
"function",
"publishDraft",
"(",
"Content",
"$",
"content",
")",
"{",
"$",
"this",
"->",
"getRepository",
"(",
")",
"->",
"sudo",
"(",
"function",
"(",
"Repository",
"$",
"repository",
")",
"use",
"(",
"$",
"content",
")",
"{",
"$",
"repository... | Publishes a content draft.
@param Content $content | [
"Publishes",
"a",
"content",
"draft",
"."
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/ObjectManager/BasicContent.php#L61-L69 |
ezsystems/BehatBundle | ObjectManager/BasicContent.php | BasicContent.createContentDraft | function createContentDraft($parentLocationId, $contentTypeIdentifier, $fields, $languageCode = null )
{
$languageCode = $languageCode ?: self::DEFAULT_LANGUAGE;
$repository = $this->getRepository();
$content = $repository->sudo(
function() use( $repository, $languageCode, $cont... | php | function createContentDraft($parentLocationId, $contentTypeIdentifier, $fields, $languageCode = null )
{
$languageCode = $languageCode ?: self::DEFAULT_LANGUAGE;
$repository = $this->getRepository();
$content = $repository->sudo(
function() use( $repository, $languageCode, $cont... | [
"function",
"createContentDraft",
"(",
"$",
"parentLocationId",
",",
"$",
"contentTypeIdentifier",
",",
"$",
"fields",
",",
"$",
"languageCode",
"=",
"null",
")",
"{",
"$",
"languageCode",
"=",
"$",
"languageCode",
"?",
":",
"self",
"::",
"DEFAULT_LANGUAGE",
"... | Creates a content draft using sudo().
@param Location $parentLocationId
@param string $contentTypeIdentifier
@param string $languageCode
@param array $fields Fields, as primitives understood by setField
@return Content an unpublished Content draft | [
"Creates",
"a",
"content",
"draft",
"using",
"sudo",
"()",
"."
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/ObjectManager/BasicContent.php#L81-L105 |
ezsystems/BehatBundle | ObjectManager/BasicContent.php | BasicContent.destroy | protected function destroy( ValueObject $object )
{
/** @var \eZ\Publish\API\Repository\Repository $repository */
$repository = $this->getRepository();
$contentId = $object->id;
$repository->sudo(
function() use( $repository, $contentId )
{
tr... | php | protected function destroy( ValueObject $object )
{
/** @var \eZ\Publish\API\Repository\Repository $repository */
$repository = $this->getRepository();
$contentId = $object->id;
$repository->sudo(
function() use( $repository, $contentId )
{
tr... | [
"protected",
"function",
"destroy",
"(",
"ValueObject",
"$",
"object",
")",
"{",
"/** @var \\eZ\\Publish\\API\\Repository\\Repository $repository */",
"$",
"repository",
"=",
"$",
"this",
"->",
"getRepository",
"(",
")",
";",
"$",
"contentId",
"=",
"$",
"object",
"-... | Deletes the content object provided
used to clean after testing | [
"Deletes",
"the",
"content",
"object",
"provided",
"used",
"to",
"clean",
"after",
"testing"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/ObjectManager/BasicContent.php#L162-L182 |
ezsystems/BehatBundle | Helper/ValueObject.php | ValueObject.getProperty | static function getProperty( ValueObjectInterface $object, $property )
{
if ( property_exists( $object, $property ) )
{
return $object->$property;
}
else if ( method_exists( $object, 'setField' ) )
{
return $object->getField( $property );
}
... | php | static function getProperty( ValueObjectInterface $object, $property )
{
if ( property_exists( $object, $property ) )
{
return $object->$property;
}
else if ( method_exists( $object, 'setField' ) )
{
return $object->getField( $property );
}
... | [
"static",
"function",
"getProperty",
"(",
"ValueObjectInterface",
"$",
"object",
",",
"$",
"property",
")",
"{",
"if",
"(",
"property_exists",
"(",
"$",
"object",
",",
"$",
"property",
")",
")",
"{",
"return",
"$",
"object",
"->",
"$",
"property",
";",
"... | Gets $property from $object
@param \eZ\Publish\API\Repository\Values\ValueObject $object The object to be updated
@param string $property Name of property or field
@return mixed
@throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentException If the property/field is not found | [
"Gets",
"$property",
"from",
"$object"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Helper/ValueObject.php#L33-L47 |
ezsystems/BehatBundle | Helper/ValueObject.php | ValueObject.setProperty | static function setProperty( ValueObjectInterface $object, $property, $value )
{
if ( property_exists( $object, $property ) )
{
$object->$property = $value;
}
else if ( method_exists( $object, 'setField' ) )
{
$object->setField( $property, $value );
... | php | static function setProperty( ValueObjectInterface $object, $property, $value )
{
if ( property_exists( $object, $property ) )
{
$object->$property = $value;
}
else if ( method_exists( $object, 'setField' ) )
{
$object->setField( $property, $value );
... | [
"static",
"function",
"setProperty",
"(",
"ValueObjectInterface",
"$",
"object",
",",
"$",
"property",
",",
"$",
"value",
")",
"{",
"if",
"(",
"property_exists",
"(",
"$",
"object",
",",
"$",
"property",
")",
")",
"{",
"$",
"object",
"->",
"$",
"property... | Sets $property in $object to $value
@param \eZ\Publish\API\Repository\Values\ValueObject $object The object to be updated
@param string $property Name of property or field
@param mixed $value The value to set the property/field to
@throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentException If the property/fiel... | [
"Sets",
"$property",
"in",
"$object",
"to",
"$value"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Helper/ValueObject.php#L58-L72 |
ezsystems/BehatBundle | Helper/ValueObject.php | ValueObject.setProperties | static function setProperties( ValueObjectInterface $object, array $values )
{
foreach ( $values as $property => $value )
{
$this->setProperty( $object, $property, $value );
}
} | php | static function setProperties( ValueObjectInterface $object, array $values )
{
foreach ( $values as $property => $value )
{
$this->setProperty( $object, $property, $value );
}
} | [
"static",
"function",
"setProperties",
"(",
"ValueObjectInterface",
"$",
"object",
",",
"array",
"$",
"values",
")",
"{",
"foreach",
"(",
"$",
"values",
"as",
"$",
"property",
"=>",
"$",
"value",
")",
"{",
"$",
"this",
"->",
"setProperty",
"(",
"$",
"obj... | Sets an objects properties
@param \eZ\Publish\API\Repository\Values\ValueObject $object Object to be updated
@param array $values Associative array with properties => values | [
"Sets",
"an",
"objects",
"properties"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Helper/ValueObject.php#L80-L86 |
ezsystems/BehatBundle | Helper/ValueObject.php | ValueObject.tooArray | static function tooArray( ValueObjectInterface $object )
{
// clone object to ReflectionClass
$reflectionClass = new \ReflectionClass( $object );
// get each property/field
$properties = array();
foreach ( $reflectionClass->getProperties() as $reflectionProperty )
{
... | php | static function tooArray( ValueObjectInterface $object )
{
// clone object to ReflectionClass
$reflectionClass = new \ReflectionClass( $object );
// get each property/field
$properties = array();
foreach ( $reflectionClass->getProperties() as $reflectionProperty )
{
... | [
"static",
"function",
"tooArray",
"(",
"ValueObjectInterface",
"$",
"object",
")",
"{",
"// clone object to ReflectionClass",
"$",
"reflectionClass",
"=",
"new",
"\\",
"ReflectionClass",
"(",
"$",
"object",
")",
";",
"// get each property/field",
"$",
"properties",
"=... | Convert/serialize ValueObject to array
@param \eZ\Publish\API\Repository\Values\ValueObject $object Object to get all properties/fields
@return array
@todo For ContentType the object will have several fields/properties with same name (for example 'names' that will exist in every FieldDefinition) | [
"Convert",
"/",
"serialize",
"ValueObject",
"to",
"array"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Helper/ValueObject.php#L97-L110 |
ezsystems/BehatBundle | ObjectManager/User.php | User.searchUserGroups | public function searchUserGroups( $name, $parentLocationId = null )
{
return $this->getContext()->getUserGroupManager()->searchUserGroups( $name, $parentLocationId );
} | php | public function searchUserGroups( $name, $parentLocationId = null )
{
return $this->getContext()->getUserGroupManager()->searchUserGroups( $name, $parentLocationId );
} | [
"public",
"function",
"searchUserGroups",
"(",
"$",
"name",
",",
"$",
"parentLocationId",
"=",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"getContext",
"(",
")",
"->",
"getUserGroupManager",
"(",
")",
"->",
"searchUserGroups",
"(",
"$",
"name",
",",
"$... | Search User Groups with given name
@param string $name name of User Group to search for
@param string $parentLocationId (optional) parent location id to search in
@return search results | [
"Search",
"User",
"Groups",
"with",
"given",
"name"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/ObjectManager/User.php#L64-L67 |
ezsystems/BehatBundle | ObjectManager/User.php | User.createUserGroup | public function createUserGroup( $name, $parentGroup = null )
{
return $this->getContext()->getUserGroupManager()->createUserGroup( $name, $parentGroup );
} | php | public function createUserGroup( $name, $parentGroup = null )
{
return $this->getContext()->getUserGroupManager()->createUserGroup( $name, $parentGroup );
} | [
"public",
"function",
"createUserGroup",
"(",
"$",
"name",
",",
"$",
"parentGroup",
"=",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"getContext",
"(",
")",
"->",
"getUserGroupManager",
"(",
")",
"->",
"createUserGroup",
"(",
"$",
"name",
",",
"$",
"p... | Create new User Group inside existing parent User Group
@param string $name User Group name
@param \eZ\Publish\API\Repository\Values\User\UserGroup $parentGroup (optional) parent user group, defaults to UserGroup "/Users"
@return \eZ\Publish\API\Repository\Values\User\UserGroup | [
"Create",
"new",
"User",
"Group",
"inside",
"existing",
"parent",
"User",
"Group"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/ObjectManager/User.php#L77-L80 |
ezsystems/BehatBundle | ObjectManager/User.php | User.loadUser | public function loadUser( $id )
{
/** @var \eZ\Publish\API\Repository\Repository $repository */
$repository = $this->getRepository();
$userService = $repository->getUserService();
$user = $repository->sudo(
function() use( $id, $userService )
{
... | php | public function loadUser( $id )
{
/** @var \eZ\Publish\API\Repository\Repository $repository */
$repository = $this->getRepository();
$userService = $repository->getUserService();
$user = $repository->sudo(
function() use( $id, $userService )
{
... | [
"public",
"function",
"loadUser",
"(",
"$",
"id",
")",
"{",
"/** @var \\eZ\\Publish\\API\\Repository\\Repository $repository */",
"$",
"repository",
"=",
"$",
"this",
"->",
"getRepository",
"(",
")",
";",
"$",
"userService",
"=",
"$",
"repository",
"->",
"getUserSer... | Load a User by id
@param int $id User content identifier
@return \eZ\Publish\API\Repository\Values\User\User | [
"Load",
"a",
"User",
"by",
"id"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/ObjectManager/User.php#L89-L103 |
ezsystems/BehatBundle | ObjectManager/User.php | User.loadUserByLogin | public function loadUserByLogin( $login )
{
/** @var \eZ\Publish\API\Repository\Repository $repository */
$repository = $this->getRepository();
$userService = $repository->getUserService();
$user = $repository->sudo(
function() use( $login, $userService )
{
... | php | public function loadUserByLogin( $login )
{
/** @var \eZ\Publish\API\Repository\Repository $repository */
$repository = $this->getRepository();
$userService = $repository->getUserService();
$user = $repository->sudo(
function() use( $login, $userService )
{
... | [
"public",
"function",
"loadUserByLogin",
"(",
"$",
"login",
")",
"{",
"/** @var \\eZ\\Publish\\API\\Repository\\Repository $repository */",
"$",
"repository",
"=",
"$",
"this",
"->",
"getRepository",
"(",
")",
";",
"$",
"userService",
"=",
"$",
"repository",
"->",
"... | Load a User by login
@param int $id User content identifier
@return \eZ\Publish\API\Repository\Values\User\User | [
"Load",
"a",
"User",
"by",
"login"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/ObjectManager/User.php#L112-L126 |
ezsystems/BehatBundle | ObjectManager/User.php | User.updateUser | public function updateUser( $user, $fields = array() )
{
/** @var \eZ\Publish\API\Repository\Repository $repository */
$repository = $this->getRepository();
$contentService = $repository->getContentService();
$userService = $repository->getUserService();
$userUpdateStruct = ... | php | public function updateUser( $user, $fields = array() )
{
/** @var \eZ\Publish\API\Repository\Repository $repository */
$repository = $this->getRepository();
$contentService = $repository->getContentService();
$userService = $repository->getUserService();
$userUpdateStruct = ... | [
"public",
"function",
"updateUser",
"(",
"$",
"user",
",",
"$",
"fields",
"=",
"array",
"(",
")",
")",
"{",
"/** @var \\eZ\\Publish\\API\\Repository\\Repository $repository */",
"$",
"repository",
"=",
"$",
"this",
"->",
"getRepository",
"(",
")",
";",
"$",
"con... | Update user with given field and value
@param $user user to update
@param $fieldLabel name of the field to update
@param $fieldValue value of the field to update to | [
"Update",
"user",
"with",
"given",
"field",
"and",
"value"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/ObjectManager/User.php#L228-L260 |
ezsystems/BehatBundle | ObjectManager/User.php | User.checkUserExistenceByEmail | public function checkUserExistenceByEmail( $email, $parentGroupName = null )
{
/** @var \eZ\Publish\API\Repository\Repository $repository */
$repository = $this->getRepository();
$userService = $repository->getUserService();
$existingUsers = $userService->loadUsersByEmail( $email );... | php | public function checkUserExistenceByEmail( $email, $parentGroupName = null )
{
/** @var \eZ\Publish\API\Repository\Repository $repository */
$repository = $this->getRepository();
$userService = $repository->getUserService();
$existingUsers = $userService->loadUsersByEmail( $email );... | [
"public",
"function",
"checkUserExistenceByEmail",
"(",
"$",
"email",
",",
"$",
"parentGroupName",
"=",
"null",
")",
"{",
"/** @var \\eZ\\Publish\\API\\Repository\\Repository $repository */",
"$",
"repository",
"=",
"$",
"this",
"->",
"getRepository",
"(",
")",
";",
"... | Checks if the User with email $email exists
@param string $email User email
@param string $parentGroupName User group name to search inside
@return boolean true if it exists, false if not | [
"Checks",
"if",
"the",
"User",
"with",
"email",
"$email",
"exists"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/ObjectManager/User.php#L425-L451 |
ezsystems/BehatBundle | ObjectManager/User.php | User.checkUserExistenceById | public function checkUserExistenceById( $id )
{
/** @var \eZ\Publish\API\Repository\Repository $repository */
$repository = $this->getRepository();
$userService = $repository->getUserService();
return $repository->sudo(
function() use( $id, $userService )
{
... | php | public function checkUserExistenceById( $id )
{
/** @var \eZ\Publish\API\Repository\Repository $repository */
$repository = $this->getRepository();
$userService = $repository->getUserService();
return $repository->sudo(
function() use( $id, $userService )
{
... | [
"public",
"function",
"checkUserExistenceById",
"(",
"$",
"id",
")",
"{",
"/** @var \\eZ\\Publish\\API\\Repository\\Repository $repository */",
"$",
"repository",
"=",
"$",
"this",
"->",
"getRepository",
"(",
")",
";",
"$",
"userService",
"=",
"$",
"repository",
"->",... | Checks if the User with $id exists
@param string $id Identifier of the possible content
@return boolean true if it exists, false if not | [
"Checks",
"if",
"the",
"User",
"with",
"$id",
"exists"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/ObjectManager/User.php#L460-L481 |
ezsystems/BehatBundle | ObjectManager/User.php | User.verifyPasswordHash | public function verifyPasswordHash( $login, $password, $type, $passwordHash )
{
// If type is 6 or higher it uses PHP's builtin password_verify
if ($type >= 6) {
return password_verify($password, $passwordHash);
}
// If not fall back to old logic
return $this->cr... | php | public function verifyPasswordHash( $login, $password, $type, $passwordHash )
{
// If type is 6 or higher it uses PHP's builtin password_verify
if ($type >= 6) {
return password_verify($password, $passwordHash);
}
// If not fall back to old logic
return $this->cr... | [
"public",
"function",
"verifyPasswordHash",
"(",
"$",
"login",
",",
"$",
"password",
",",
"$",
"type",
",",
"$",
"passwordHash",
")",
"{",
"// If type is 6 or higher it uses PHP's builtin password_verify",
"if",
"(",
"$",
"type",
">=",
"6",
")",
"{",
"return",
"... | @param string $login
@param string $password
@param int $type
@param string $passwordHash
@return bool | [
"@param",
"string",
"$login",
"@param",
"string",
"$password",
"@param",
"int",
"$type",
"@param",
"string",
"$passwordHash"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/ObjectManager/User.php#L491-L500 |
ezsystems/BehatBundle | Context/Object/Role.php | Role.iSeeRole | public function iSeeRole( $name )
{
$role = $this->getRoleManager()->getRole( $name );
Assertion::assertNotNull(
$role,
"Couldn't find Role with name $name"
);
} | php | public function iSeeRole( $name )
{
$role = $this->getRoleManager()->getRole( $name );
Assertion::assertNotNull(
$role,
"Couldn't find Role with name $name"
);
} | [
"public",
"function",
"iSeeRole",
"(",
"$",
"name",
")",
"{",
"$",
"role",
"=",
"$",
"this",
"->",
"getRoleManager",
"(",
")",
"->",
"getRole",
"(",
"$",
"name",
")",
";",
"Assertion",
"::",
"assertNotNull",
"(",
"$",
"role",
",",
"\"Couldn't find Role w... | @Then I see that a/an :name role exists
Verifies that a role with $name exists. | [
"@Then",
"I",
"see",
"that",
"a",
"/",
"an",
":",
"name",
"role",
"exists"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/Role.php#L38-L45 |
ezsystems/BehatBundle | Context/Object/Role.php | Role.iDontSeeRole | public function iDontSeeRole( $name )
{
$role = $this->getRoleManager()->getRole( $name );
Assertion::assertNull(
$role,
"Found Role with name $name"
);
} | php | public function iDontSeeRole( $name )
{
$role = $this->getRoleManager()->getRole( $name );
Assertion::assertNull(
$role,
"Found Role with name $name"
);
} | [
"public",
"function",
"iDontSeeRole",
"(",
"$",
"name",
")",
"{",
"$",
"role",
"=",
"$",
"this",
"->",
"getRoleManager",
"(",
")",
"->",
"getRole",
"(",
"$",
"name",
")",
";",
"Assertion",
"::",
"assertNull",
"(",
"$",
"role",
",",
"\"Found Role with nam... | @Then I see that a/an :name role does not exists
Verifies that a role with $name exists. | [
"@Then",
"I",
"see",
"that",
"a",
"/",
"an",
":",
"name",
"role",
"does",
"not",
"exists"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/Role.php#L62-L69 |
ezsystems/BehatBundle | ObjectManager/FieldType.php | FieldType.publishContent | private function publishContent( $field, $value )
{
$repository = $this->getRepository();
$languageCode = self::DEFAULT_LANGUAGE;
$content = $repository->sudo(
function() use( $repository, $languageCode, $field, $value )
{
$contentService = $repositor... | php | private function publishContent( $field, $value )
{
$repository = $this->getRepository();
$languageCode = self::DEFAULT_LANGUAGE;
$content = $repository->sudo(
function() use( $repository, $languageCode, $field, $value )
{
$contentService = $repositor... | [
"private",
"function",
"publishContent",
"(",
"$",
"field",
",",
"$",
"value",
")",
"{",
"$",
"repository",
"=",
"$",
"this",
"->",
"getRepository",
"(",
")",
";",
"$",
"languageCode",
"=",
"self",
"::",
"DEFAULT_LANGUAGE",
";",
"$",
"content",
"=",
"$",... | Publishes the content
@param string The field name
@param mixed The field value | [
"Publishes",
"the",
"content"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/ObjectManager/FieldType.php#L196-L222 |
ezsystems/BehatBundle | ObjectManager/FieldType.php | FieldType.createContentType | private function createContentType()
{
$repository = $this->getRepository();
$contentTypeService = $repository->getContentTypeService();
$name = $this->fieldConstructionObject[ 'fieldType' ]->identifier;
$name = uniqid($name . '#', true);
$name = str_replace('.', '', $name);
... | php | private function createContentType()
{
$repository = $this->getRepository();
$contentTypeService = $repository->getContentTypeService();
$name = $this->fieldConstructionObject[ 'fieldType' ]->identifier;
$name = uniqid($name . '#', true);
$name = str_replace('.', '', $name);
... | [
"private",
"function",
"createContentType",
"(",
")",
"{",
"$",
"repository",
"=",
"$",
"this",
"->",
"getRepository",
"(",
")",
";",
"$",
"contentTypeService",
"=",
"$",
"repository",
"->",
"getContentTypeService",
"(",
")",
";",
"$",
"name",
"=",
"$",
"t... | Creates an instance of a contenttype and stores it for later publishing | [
"Creates",
"an",
"instance",
"of",
"a",
"contenttype",
"and",
"stores",
"it",
"for",
"later",
"publishing"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/ObjectManager/FieldType.php#L312-L326 |
ezsystems/BehatBundle | Helper/Xpath.php | Xpath.makeElementXpath | public function makeElementXpath( $element, $search )
{
$selectorsHandler = $this->session->getSelectorsHandler();
$literal = $selectorsHandler->xpathLiteral( $search );
// To be able to work on mink 1.6 (ezplatform) & mink 1.5 (5.4+ezpublish-community) w/o deprecation exceptions
$s... | php | public function makeElementXpath( $element, $search )
{
$selectorsHandler = $this->session->getSelectorsHandler();
$literal = $selectorsHandler->xpathLiteral( $search );
// To be able to work on mink 1.6 (ezplatform) & mink 1.5 (5.4+ezpublish-community) w/o deprecation exceptions
$s... | [
"public",
"function",
"makeElementXpath",
"(",
"$",
"element",
",",
"$",
"search",
")",
"{",
"$",
"selectorsHandler",
"=",
"$",
"this",
"->",
"session",
"->",
"getSelectorsHandler",
"(",
")",
";",
"$",
"literal",
"=",
"$",
"selectorsHandler",
"->",
"xpathLit... | Make XPath for a specific element/object using Behat selectors
@param string $element Type of element for the XPath
@param string $search String to search
@return string XPath for the element/object | [
"Make",
"XPath",
"for",
"a",
"specific",
"element",
"/",
"object",
"using",
"Behat",
"selectors"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Helper/Xpath.php#L62-L73 |
ezsystems/BehatBundle | Helper/Xpath.php | Xpath.findObjects | public function findObjects( $element, $search, $prefix = null )
{
$xpath = $this->mergePrefixToXpath(
$prefix,
$this->makeElementXpath( $element, $search )
);
return $this->findXpath( $xpath );
} | php | public function findObjects( $element, $search, $prefix = null )
{
$xpath = $this->mergePrefixToXpath(
$prefix,
$this->makeElementXpath( $element, $search )
);
return $this->findXpath( $xpath );
} | [
"public",
"function",
"findObjects",
"(",
"$",
"element",
",",
"$",
"search",
",",
"$",
"prefix",
"=",
"null",
")",
"{",
"$",
"xpath",
"=",
"$",
"this",
"->",
"mergePrefixToXpath",
"(",
"$",
"prefix",
",",
"$",
"this",
"->",
"makeElementXpath",
"(",
"$... | Find page objects/elements
@param string $element Object type
@param string $search Text to search for
@param null|string $prefix XPath prefix if needed
@return \Behat\Mink\Element\NodeElement[] Array with NodeEelments that match | [
"Find",
"page",
"objects",
"/",
"elements"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Helper/Xpath.php#L84-L92 |
ezsystems/BehatBundle | Helper/Xpath.php | Xpath.mergePrefixToXpath | public function mergePrefixToXpath( $prefix, $xpath )
{
if ( empty( $prefix ) )
{
return $xpath;
}
if ( $prefix[strlen( $prefix ) - 1] !== '/' )
{
$prefix .= '/';
}
return $prefix . implode( "| $prefix", explode( '|', $xpath ) );
... | php | public function mergePrefixToXpath( $prefix, $xpath )
{
if ( empty( $prefix ) )
{
return $xpath;
}
if ( $prefix[strlen( $prefix ) - 1] !== '/' )
{
$prefix .= '/';
}
return $prefix . implode( "| $prefix", explode( '|', $xpath ) );
... | [
"public",
"function",
"mergePrefixToXpath",
"(",
"$",
"prefix",
",",
"$",
"xpath",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"prefix",
")",
")",
"{",
"return",
"$",
"xpath",
";",
"}",
"if",
"(",
"$",
"prefix",
"[",
"strlen",
"(",
"$",
"prefix",
")",
... | Merge/inject prefix into multiple case XPath
ex:
$xpath = '//h1 | //h2';
$prefix = '//article';
return "//article/.//h1 | //article/.//h2"
@param string $prefix XPath prefix
@param string $xpath Complete XPath
@return string XPath with prefixes (or original if no prefix passed) | [
"Merge",
"/",
"inject",
"prefix",
"into",
"multiple",
"case",
"XPath"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Helper/Xpath.php#L250-L263 |
ezsystems/BehatBundle | Context/Object/User.php | User.iHaveUser | public function iHaveUser( $username )
{
$email = $this->findNonExistingUserEmail( $username );
$password = $this->getUserManager()->getDefaultPassword();
$user = $this->getUserManager()->ensureUserExists( $username, $email, $password );
$this->addValuesToKeyMap( $email, $user->email... | php | public function iHaveUser( $username )
{
$email = $this->findNonExistingUserEmail( $username );
$password = $this->getUserManager()->getDefaultPassword();
$user = $this->getUserManager()->ensureUserExists( $username, $email, $password );
$this->addValuesToKeyMap( $email, $user->email... | [
"public",
"function",
"iHaveUser",
"(",
"$",
"username",
")",
"{",
"$",
"email",
"=",
"$",
"this",
"->",
"findNonExistingUserEmail",
"(",
"$",
"username",
")",
";",
"$",
"password",
"=",
"$",
"this",
"->",
"getUserManager",
"(",
")",
"->",
"getDefaultPassw... | @Given there is a User with name :username
Ensures a user with username ':username' exists, creating a new one if necessary.
@return \eZ\Publish\API\Repository\Values\User\User | [
"@Given",
"there",
"is",
"a",
"User",
"with",
"name",
":",
"username"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/User.php#L27-L33 |
ezsystems/BehatBundle | Context/Object/User.php | User.iHaveUserWithUsernameEmailAndPassword | public function iHaveUserWithUsernameEmailAndPassword( $username, $email, $password )
{
$this->getUserManager()->ensureUserExists( $username, $email, $password );
} | php | public function iHaveUserWithUsernameEmailAndPassword( $username, $email, $password )
{
$this->getUserManager()->ensureUserExists( $username, $email, $password );
} | [
"public",
"function",
"iHaveUserWithUsernameEmailAndPassword",
"(",
"$",
"username",
",",
"$",
"email",
",",
"$",
"password",
")",
"{",
"$",
"this",
"->",
"getUserManager",
"(",
")",
"->",
"ensureUserExists",
"(",
"$",
"username",
",",
"$",
"email",
",",
"$"... | @Given there is a User with name :username, email :email and password :password
Ensures a user exists with given username/email/password, creating a new one if necessary.
@return \eZ\Publish\API\Repository\Values\User\User | [
"@Given",
"there",
"is",
"a",
"User",
"with",
"name",
":",
"username",
"email",
":",
"email",
"and",
"password",
":",
"password"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/User.php#L42-L45 |
ezsystems/BehatBundle | Context/Object/User.php | User.iHaveUserInGroup | public function iHaveUserInGroup( $username, $parentGroupName )
{
$email = $this->findNonExistingUserEmail( $username );
$password = $this->getUserManager()->getDefaultPassword();
$user = $this->getUserManager()->ensureUserExists( $username, $email, $password, $parentGroupName );
$th... | php | public function iHaveUserInGroup( $username, $parentGroupName )
{
$email = $this->findNonExistingUserEmail( $username );
$password = $this->getUserManager()->getDefaultPassword();
$user = $this->getUserManager()->ensureUserExists( $username, $email, $password, $parentGroupName );
$th... | [
"public",
"function",
"iHaveUserInGroup",
"(",
"$",
"username",
",",
"$",
"parentGroupName",
")",
"{",
"$",
"email",
"=",
"$",
"this",
"->",
"findNonExistingUserEmail",
"(",
"$",
"username",
")",
";",
"$",
"password",
"=",
"$",
"this",
"->",
"getUserManager"... | @Given there is a User with name :username in :parentGroup group
Ensures a user with username ':username' exists as a child of ':parentGroup' user group, can create either one.
@return \eZ\Publish\API\Repository\Values\User\User | [
"@Given",
"there",
"is",
"a",
"User",
"with",
"name",
":",
"username",
"in",
":",
"parentGroup",
"group"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/User.php#L54-L60 |
ezsystems/BehatBundle | Context/Object/User.php | User.iHaveUserWithFields | public function iHaveUserWithFields( $username, TableNode $table )
{
$fieldsTable = $table->getTable();
array_shift( $fieldsTable );
$fields = array();
foreach ( $fieldsTable as $fieldRow )
{
$fields[ $fieldRow[0] ] = $fieldRow[1];
}
$password = i... | php | public function iHaveUserWithFields( $username, TableNode $table )
{
$fieldsTable = $table->getTable();
array_shift( $fieldsTable );
$fields = array();
foreach ( $fieldsTable as $fieldRow )
{
$fields[ $fieldRow[0] ] = $fieldRow[1];
}
$password = i... | [
"public",
"function",
"iHaveUserWithFields",
"(",
"$",
"username",
",",
"TableNode",
"$",
"table",
")",
"{",
"$",
"fieldsTable",
"=",
"$",
"table",
"->",
"getTable",
"(",
")",
";",
"array_shift",
"(",
"$",
"fieldsTable",
")",
";",
"$",
"fields",
"=",
"ar... | @Given there is a User with name :username with the following fields:
Ensures a user exists with the values provided in the fields/value table. example:
| Name | value |
| email | testuser@ez.no |
| password | testuser |
| first_name | Test |
| last_name | User... | [
"@Given",
"there",
"is",
"a",
"User",
"with",
"name",
":",
"username",
"with",
"the",
"following",
"fields",
":"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/User.php#L86-L104 |
ezsystems/BehatBundle | Context/Object/User.php | User.iHaveUserWithId | public function iHaveUserWithId( $id )
{
$name = $this->findNonExistingUserName();
$user = $this->getUserManager()->ensureUserExists( $name );
$this->addValuesToKeyMap( $id, $user->id );
} | php | public function iHaveUserWithId( $id )
{
$name = $this->findNonExistingUserName();
$user = $this->getUserManager()->ensureUserExists( $name );
$this->addValuesToKeyMap( $id, $user->id );
} | [
"public",
"function",
"iHaveUserWithId",
"(",
"$",
"id",
")",
"{",
"$",
"name",
"=",
"$",
"this",
"->",
"findNonExistingUserName",
"(",
")",
";",
"$",
"user",
"=",
"$",
"this",
"->",
"getUserManager",
"(",
")",
"->",
"ensureUserExists",
"(",
"$",
"name",... | @Given there is a User with id :id
Makes user a user with (mapped) id ':id' exists | [
"@Given",
"there",
"is",
"a",
"User",
"with",
"id",
":",
"id"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/User.php#L131-L136 |
ezsystems/BehatBundle | Context/Object/User.php | User.iHaveUserWithIdInGroup | public function iHaveUserWithIdInGroup( $username, $id, $parentGroup )
{
$user = $this->getUserManager()->ensureUserExists( $username, $parentGroup );
$this->addValuesToMap( $id, $user->id );
} | php | public function iHaveUserWithIdInGroup( $username, $id, $parentGroup )
{
$user = $this->getUserManager()->ensureUserExists( $username, $parentGroup );
$this->addValuesToMap( $id, $user->id );
} | [
"public",
"function",
"iHaveUserWithIdInGroup",
"(",
"$",
"username",
",",
"$",
"id",
",",
"$",
"parentGroup",
")",
"{",
"$",
"user",
"=",
"$",
"this",
"->",
"getUserManager",
"(",
")",
"->",
"ensureUserExists",
"(",
"$",
"username",
",",
"$",
"parentGroup... | @Given there is a User with name :username with id :id in :parentGroup group
Ensures a user with username ':username' and id ':id' exists as a child of ':parentGroup' user group, can create either one. | [
"@Given",
"there",
"is",
"a",
"User",
"with",
"name",
":",
"username",
"with",
"id",
":",
"id",
"in",
":",
"parentGroup",
"group"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/User.php#L143-L147 |
ezsystems/BehatBundle | Context/Object/User.php | User.iHaveTheFollowingUsers | public function iHaveTheFollowingUsers( TableNode $table )
{
$users = $table->getTable();
array_shift( $users );
foreach ( $users as $user )
{
// array( [0] => userName, [1] => groupName );
$this->getUserManager()->ensureUserExists( $user[0], $user[1] );
... | php | public function iHaveTheFollowingUsers( TableNode $table )
{
$users = $table->getTable();
array_shift( $users );
foreach ( $users as $user )
{
// array( [0] => userName, [1] => groupName );
$this->getUserManager()->ensureUserExists( $user[0], $user[1] );
... | [
"public",
"function",
"iHaveTheFollowingUsers",
"(",
"TableNode",
"$",
"table",
")",
"{",
"$",
"users",
"=",
"$",
"table",
"->",
"getTable",
"(",
")",
";",
"array_shift",
"(",
"$",
"users",
")",
";",
"foreach",
"(",
"$",
"users",
"as",
"$",
"user",
")"... | @Given there are the following Users:
Make sure that users in the provided table exist in their respective parent group. Example:
| username | parentGroup |
| testUser1 | Members |
| testUser2 | Editors |
| testUser3 | NewParent | # Both user and group should be c... | [
"@Given",
"there",
"are",
"the",
"following",
"Users",
":"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/User.php#L158-L168 |
ezsystems/BehatBundle | Context/Object/User.php | User.assertUserWithNameExistsInGroup | public function assertUserWithNameExistsInGroup( $username, $parentGroup )
{
Assertion::assertTrue(
$this->getUserManager()->checkUserExistenceByUsername( $username, $parentGroup ),
"Couldn't find User with name '$username' in parent group '$parentGroup'."
);
} | php | public function assertUserWithNameExistsInGroup( $username, $parentGroup )
{
Assertion::assertTrue(
$this->getUserManager()->checkUserExistenceByUsername( $username, $parentGroup ),
"Couldn't find User with name '$username' in parent group '$parentGroup'."
);
} | [
"public",
"function",
"assertUserWithNameExistsInGroup",
"(",
"$",
"username",
",",
"$",
"parentGroup",
")",
"{",
"Assertion",
"::",
"assertTrue",
"(",
"$",
"this",
"->",
"getUserManager",
"(",
")",
"->",
"checkUserExistenceByUsername",
"(",
"$",
"username",
",",
... | @Then User with name :username exists in group :parentGroup
@Then User with name :username exists in :parentGroup group
Checks that user ':username' exists as a child of group ':parentGroup' | [
"@Then",
"User",
"with",
"name",
":",
"username",
"exists",
"in",
"group",
":",
"parentGroup",
"@Then",
"User",
"with",
"name",
":",
"username",
"exists",
"in",
":",
"parentGroup",
"group"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/User.php#L203-L209 |
ezsystems/BehatBundle | Context/Object/User.php | User.assertUserWithNameDoesntExistInGroup | public function assertUserWithNameDoesntExistInGroup( $username, $parentGroup )
{
Assertion::assertFalse(
$this->getUserManager()->checkUserExistenceByUsername( $username, $parentGroup ),
"User with name '$username' was found in parent group '$parentGroup'."
);
} | php | public function assertUserWithNameDoesntExistInGroup( $username, $parentGroup )
{
Assertion::assertFalse(
$this->getUserManager()->checkUserExistenceByUsername( $username, $parentGroup ),
"User with name '$username' was found in parent group '$parentGroup'."
);
} | [
"public",
"function",
"assertUserWithNameDoesntExistInGroup",
"(",
"$",
"username",
",",
"$",
"parentGroup",
")",
"{",
"Assertion",
"::",
"assertFalse",
"(",
"$",
"this",
"->",
"getUserManager",
"(",
")",
"->",
"checkUserExistenceByUsername",
"(",
"$",
"username",
... | @Then User with name :username doesn't exist in group :parentGroup
@Then User with name :username doesn't exist in :parentGroup group
Checks that user ':username' does not exist as a child of group ':parentGroup' | [
"@Then",
"User",
"with",
"name",
":",
"username",
"doesn",
"t",
"exist",
"in",
"group",
":",
"parentGroup",
"@Then",
"User",
"with",
"name",
":",
"username",
"doesn",
"t",
"exist",
"in",
":",
"parentGroup",
"group"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/User.php#L217-L223 |
ezsystems/BehatBundle | Context/Object/User.php | User.assertUserWithNameDoesntExistInGroups | public function assertUserWithNameDoesntExistInGroups( $username, TableNode $table )
{
$groups = $table->getTable();
array_shift( $groups );
foreach ( $groups as $group )
{
$parentGroupName = $group[0];
Assertion::assertFalse(
$this->getUserMan... | php | public function assertUserWithNameDoesntExistInGroups( $username, TableNode $table )
{
$groups = $table->getTable();
array_shift( $groups );
foreach ( $groups as $group )
{
$parentGroupName = $group[0];
Assertion::assertFalse(
$this->getUserMan... | [
"public",
"function",
"assertUserWithNameDoesntExistInGroups",
"(",
"$",
"username",
",",
"TableNode",
"$",
"table",
")",
"{",
"$",
"groups",
"=",
"$",
"table",
"->",
"getTable",
"(",
")",
";",
"array_shift",
"(",
"$",
"groups",
")",
";",
"foreach",
"(",
"... | @Then User with name :username doesn't exist in the following groups:
Checks that user ':username' does not exist in any of the provided groups. Example:
| parentGroup |
| Partners |
| Anonymous Users |
| Editors |
| Administrator users | | [
"@Then",
"User",
"with",
"name",
":",
"username",
"doesn",
"t",
"exist",
"in",
"the",
"following",
"groups",
":"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/User.php#L235-L247 |
ezsystems/BehatBundle | Context/Object/User.php | User.assertUserWithNameExistsWithFields | public function assertUserWithNameExistsWithFields( $username, TableNode $table )
{
Assertion::assertTrue(
$this->getUserManager()->checkUserExistenceByUsername( $username ),
"Couldn't find User with name '$username'."
);
$user = $this->getUserManager()->loadUserByLo... | php | public function assertUserWithNameExistsWithFields( $username, TableNode $table )
{
Assertion::assertTrue(
$this->getUserManager()->checkUserExistenceByUsername( $username ),
"Couldn't find User with name '$username'."
);
$user = $this->getUserManager()->loadUserByLo... | [
"public",
"function",
"assertUserWithNameExistsWithFields",
"(",
"$",
"username",
",",
"TableNode",
"$",
"table",
")",
"{",
"Assertion",
"::",
"assertTrue",
"(",
"$",
"this",
"->",
"getUserManager",
"(",
")",
"->",
"checkUserExistenceByUsername",
"(",
"$",
"userna... | @Then User with name :username has the following fields:
@Then User with name :username exists with the following fields:
Checks that user ':username' exists with the values provided in the field/value table. example:
| Name | value |
| email | testuser@ez.no |
| password | testuser ... | [
"@Then",
"User",
"with",
"name",
":",
"username",
"has",
"the",
"following",
"fields",
":",
"@Then",
"User",
"with",
"name",
":",
"username",
"exists",
"with",
"the",
"following",
"fields",
":"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/User.php#L260-L302 |
ezsystems/BehatBundle | Context/Object/User.php | User.findNonExistingUserEmail | private function findNonExistingUserEmail( $username = 'User' )
{
$userManager = $this->getUserManager();
$email = "${username}@ez.no";
if ( $userManager->checkUserExistenceByEmail( $email ) )
{
return $email;
}
for ( $i = 0; $i < 20; $i++ )
{
... | php | private function findNonExistingUserEmail( $username = 'User' )
{
$userManager = $this->getUserManager();
$email = "${username}@ez.no";
if ( $userManager->checkUserExistenceByEmail( $email ) )
{
return $email;
}
for ( $i = 0; $i < 20; $i++ )
{
... | [
"private",
"function",
"findNonExistingUserEmail",
"(",
"$",
"username",
"=",
"'User'",
")",
"{",
"$",
"userManager",
"=",
"$",
"this",
"->",
"getUserManager",
"(",
")",
";",
"$",
"email",
"=",
"\"${username}@ez.no\"",
";",
"if",
"(",
"$",
"userManager",
"->... | Find a non existing User email
@return string A not used email
@throws \Exception Possible endless loop | [
"Find",
"a",
"non",
"existing",
"User",
"email"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/User.php#L311-L330 |
ezsystems/BehatBundle | Context/Object/User.php | User.findNonExistingUserName | private function findNonExistingUserName()
{
$userManager = $this->getUserManager();
for ( $i = 0; $i < 20; $i++ )
{
$username = substr(uniqid('User#', true), 0, 15);
if ( !$userManager->checkUserExistenceByUsername( $username ) )
{
return ... | php | private function findNonExistingUserName()
{
$userManager = $this->getUserManager();
for ( $i = 0; $i < 20; $i++ )
{
$username = substr(uniqid('User#', true), 0, 15);
if ( !$userManager->checkUserExistenceByUsername( $username ) )
{
return ... | [
"private",
"function",
"findNonExistingUserName",
"(",
")",
"{",
"$",
"userManager",
"=",
"$",
"this",
"->",
"getUserManager",
"(",
")",
";",
"for",
"(",
"$",
"i",
"=",
"0",
";",
"$",
"i",
"<",
"20",
";",
"$",
"i",
"++",
")",
"{",
"$",
"username",
... | Find a non existing User name
@return string A not used name
@throws \Exception Possible endless loop | [
"Find",
"a",
"non",
"existing",
"User",
"name"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/User.php#L339-L352 |
ezsystems/BehatBundle | Context/Object/ContentTypeGroup.php | ContentTypeGroup.ensureContentTypeGroupExists | public function ensureContentTypeGroupExists($identifier)
{
/** @var \eZ\Publish\API\Repository\ContentTypeService */
$contentTypeService = $this->contentTypeService;
$found = false;
// verify if the content type group exists
try {
$contentTypeGroup = $contentTyp... | php | public function ensureContentTypeGroupExists($identifier)
{
/** @var \eZ\Publish\API\Repository\ContentTypeService */
$contentTypeService = $this->contentTypeService;
$found = false;
// verify if the content type group exists
try {
$contentTypeGroup = $contentTyp... | [
"public",
"function",
"ensureContentTypeGroupExists",
"(",
"$",
"identifier",
")",
"{",
"/** @var \\eZ\\Publish\\API\\Repository\\ContentTypeService */",
"$",
"contentTypeService",
"=",
"$",
"this",
"->",
"contentTypeService",
";",
"$",
"found",
"=",
"false",
";",
"// ver... | @Given there is a Content Type Group with identifier :identifier
Ensures a content type group exists, creating a new one if it doesn't.
@return \eZ\Publish\API\Repository\Values\ContentType\ContentTypeGroup | [
"@Given",
"there",
"is",
"a",
"Content",
"Type",
"Group",
"with",
"identifier",
":",
"identifier"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/ContentTypeGroup.php#L48-L68 |
ezsystems/BehatBundle | Context/Object/ContentTypeGroup.php | ContentTypeGroup.ensureContentTypeGroupDoesntExist | public function ensureContentTypeGroupDoesntExist($identifier)
{
/** @var \eZ\Publish\API\Repository\ContentTypeService */
$contentTypeService = $this->contentTypeService;
// attempt to delete the content type group with the identifier
try {
$contentTypeService->deleteC... | php | public function ensureContentTypeGroupDoesntExist($identifier)
{
/** @var \eZ\Publish\API\Repository\ContentTypeService */
$contentTypeService = $this->contentTypeService;
// attempt to delete the content type group with the identifier
try {
$contentTypeService->deleteC... | [
"public",
"function",
"ensureContentTypeGroupDoesntExist",
"(",
"$",
"identifier",
")",
"{",
"/** @var \\eZ\\Publish\\API\\Repository\\ContentTypeService */",
"$",
"contentTypeService",
"=",
"$",
"this",
"->",
"contentTypeService",
";",
"// attempt to delete the content type group ... | @Given there isn't a Content Type Group with identifier :identifier
Ensures a content type group does not exist, removing it if necessary. | [
"@Given",
"there",
"isn",
"t",
"a",
"Content",
"Type",
"Group",
"with",
"identifier",
":",
"identifier"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/ContentTypeGroup.php#L75-L89 |
ezsystems/BehatBundle | Context/Object/ContentTypeGroup.php | ContentTypeGroup.ensureContentTypeGroupsExists | public function ensureContentTypeGroupsExists(TableNode $table)
{
$contentTypeGroups = $table->getTable();
array_shift($contentTypeGroups);
foreach ($contentTypeGroups as $contentTypeGroup) {
$this->ensureContentTypeGroupExists($contentTypeGroup[0]);
}
} | php | public function ensureContentTypeGroupsExists(TableNode $table)
{
$contentTypeGroups = $table->getTable();
array_shift($contentTypeGroups);
foreach ($contentTypeGroups as $contentTypeGroup) {
$this->ensureContentTypeGroupExists($contentTypeGroup[0]);
}
} | [
"public",
"function",
"ensureContentTypeGroupsExists",
"(",
"TableNode",
"$",
"table",
")",
"{",
"$",
"contentTypeGroups",
"=",
"$",
"table",
"->",
"getTable",
"(",
")",
";",
"array_shift",
"(",
"$",
"contentTypeGroups",
")",
";",
"foreach",
"(",
"$",
"content... | @Given there are the following Content Type Groups:
Make sure that content type groups in the provided table exist, by identifier. Example:
| group |
| testContentTypeGroup1 |
| testContentTypeGroup2 |
| testContentTypeGroup3 | | [
"@Given",
"there",
"are",
"the",
"following",
"Content",
"Type",
"Groups",
":"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/ContentTypeGroup.php#L100-L108 |
ezsystems/BehatBundle | Context/Object/ContentTypeGroup.php | ContentTypeGroup.checkContentTypeGroupExistenceByIdentifier | public function checkContentTypeGroupExistenceByIdentifier($identifier)
{
/** @var \eZ\Publish\API\Repository\ContentTypeService */
$contentTypeService = $this->contentTypeService;
// attempt to load the content type group with the identifier
try {
$contentTypeService->l... | php | public function checkContentTypeGroupExistenceByIdentifier($identifier)
{
/** @var \eZ\Publish\API\Repository\ContentTypeService */
$contentTypeService = $this->contentTypeService;
// attempt to load the content type group with the identifier
try {
$contentTypeService->l... | [
"public",
"function",
"checkContentTypeGroupExistenceByIdentifier",
"(",
"$",
"identifier",
")",
"{",
"/** @var \\eZ\\Publish\\API\\Repository\\ContentTypeService */",
"$",
"contentTypeService",
"=",
"$",
"this",
"->",
"contentTypeService",
";",
"// attempt to load the content type... | Checks if the ContentTypeGroup with $identifier exists
@param string $identifier Identifier of the possible content
@return boolean True if it exists | [
"Checks",
"if",
"the",
"ContentTypeGroup",
"with",
"$identifier",
"exists"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/ContentTypeGroup.php#L161-L173 |
ezsystems/BehatBundle | Context/Object/ContentTypeGroup.php | ContentTypeGroup.findNonExistingContentTypeGroupIdentifier | private function findNonExistingContentTypeGroupIdentifier()
{
$i = 0;
while ($i++ < 20) {
$identifier = 'ctg' . rand(10000, 99999);
if (!$this->checkContentTypeGroupExistenceByIdentifier($identifier)) {
return $identifier;
}
}
thr... | php | private function findNonExistingContentTypeGroupIdentifier()
{
$i = 0;
while ($i++ < 20) {
$identifier = 'ctg' . rand(10000, 99999);
if (!$this->checkContentTypeGroupExistenceByIdentifier($identifier)) {
return $identifier;
}
}
thr... | [
"private",
"function",
"findNonExistingContentTypeGroupIdentifier",
"(",
")",
"{",
"$",
"i",
"=",
"0",
";",
"while",
"(",
"$",
"i",
"++",
"<",
"20",
")",
"{",
"$",
"identifier",
"=",
"'ctg'",
".",
"rand",
"(",
"10000",
",",
"99999",
")",
";",
"if",
"... | Find a non existing ContentTypeGroup identifier
@return string A not used identifier
@throws \Exception Possible endless loop | [
"Find",
"a",
"non",
"existing",
"ContentTypeGroup",
"identifier"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/ContentTypeGroup.php#L182-L193 |
ezsystems/BehatBundle | Context/Object/UserGroup.php | UserGroup.iHaveUserGroupWithId | public function iHaveUserGroupWithId( $id )
{
$name = $this->findNonExistingUserGroupName();
$userGroup = $this->getUserGroupManager()->ensureUserGroupExists( $name );
$this->addValuesToKeyMap( $id, $userGroup->id );
} | php | public function iHaveUserGroupWithId( $id )
{
$name = $this->findNonExistingUserGroupName();
$userGroup = $this->getUserGroupManager()->ensureUserGroupExists( $name );
$this->addValuesToKeyMap( $id, $userGroup->id );
} | [
"public",
"function",
"iHaveUserGroupWithId",
"(",
"$",
"id",
")",
"{",
"$",
"name",
"=",
"$",
"this",
"->",
"findNonExistingUserGroupName",
"(",
")",
";",
"$",
"userGroup",
"=",
"$",
"this",
"->",
"getUserGroupManager",
"(",
")",
"->",
"ensureUserGroupExists"... | @Given there is a User Group with id :id
Creates a new user group with a non-existent name, and maps it's id to ':id' | [
"@Given",
"there",
"is",
"a",
"User",
"Group",
"with",
"id",
":",
"id"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/UserGroup.php#L71-L77 |
ezsystems/BehatBundle | Context/Object/UserGroup.php | UserGroup.iHaveUserGroupWithIdInGroup | public function iHaveUserGroupWithIdInGroup( $name, $id, $parentGroup )
{
$userGroup = $this->getUserGroupManager()->ensureUserGroupExists( $name, $parentGroup );
$this->addValuesToMap( $id, $userGroup->id );
} | php | public function iHaveUserGroupWithIdInGroup( $name, $id, $parentGroup )
{
$userGroup = $this->getUserGroupManager()->ensureUserGroupExists( $name, $parentGroup );
$this->addValuesToMap( $id, $userGroup->id );
} | [
"public",
"function",
"iHaveUserGroupWithIdInGroup",
"(",
"$",
"name",
",",
"$",
"id",
",",
"$",
"parentGroup",
")",
"{",
"$",
"userGroup",
"=",
"$",
"this",
"->",
"getUserGroupManager",
"(",
")",
"->",
"ensureUserGroupExists",
"(",
"$",
"name",
",",
"$",
... | @Given there is a User Group with name :name with id :id in :parentGroup group
Ensures a user group with name ':name' exists as a child of group ':parentGroup', mapping it's id to ':id' | [
"@Given",
"there",
"is",
"a",
"User",
"Group",
"with",
"name",
":",
"name",
"with",
"id",
":",
"id",
"in",
":",
"parentGroup",
"group"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/UserGroup.php#L84-L88 |
ezsystems/BehatBundle | Context/Object/UserGroup.php | UserGroup.iHaveTheFollowingUserGroups | public function iHaveTheFollowingUserGroups( TableNode $table )
{
$userGroups = $table->getTable();
array_shift( $userGroups );
foreach ( $userGroups as $userGroup )
{
$this->getUserGroupManager()->ensureUserGroupExists( $userGroup[0], $userGroup[1] );
}
} | php | public function iHaveTheFollowingUserGroups( TableNode $table )
{
$userGroups = $table->getTable();
array_shift( $userGroups );
foreach ( $userGroups as $userGroup )
{
$this->getUserGroupManager()->ensureUserGroupExists( $userGroup[0], $userGroup[1] );
}
} | [
"public",
"function",
"iHaveTheFollowingUserGroups",
"(",
"TableNode",
"$",
"table",
")",
"{",
"$",
"userGroups",
"=",
"$",
"table",
"->",
"getTable",
"(",
")",
";",
"array_shift",
"(",
"$",
"userGroups",
")",
";",
"foreach",
"(",
"$",
"userGroups",
"as",
... | @Given there are the following User Groups:
Make sure that user groups in the provided table exist in their respective parent group. Example:
| childGroup | parentGroup |
| testUserGroup1 | Members | # should create.
| testUserGroup1 | Editors | # should create.
| testUserGroup3 | Test P... | [
"@Given",
"there",
"are",
"the",
"following",
"User",
"Groups",
":"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/UserGroup.php#L100-L109 |
ezsystems/BehatBundle | Context/Object/UserGroup.php | UserGroup.assertUserGroupWithNameExistsInGroup | public function assertUserGroupWithNameExistsInGroup( $name, $parentGroup )
{
Assertion::assertTrue(
$this->getUserGroupManager()->checkUserGroupExistenceByName( $name, $parentGroup ),
"Couldn't find UserGroup with name '$name' in parent group '$parentGroup'."
);
} | php | public function assertUserGroupWithNameExistsInGroup( $name, $parentGroup )
{
Assertion::assertTrue(
$this->getUserGroupManager()->checkUserGroupExistenceByName( $name, $parentGroup ),
"Couldn't find UserGroup with name '$name' in parent group '$parentGroup'."
);
} | [
"public",
"function",
"assertUserGroupWithNameExistsInGroup",
"(",
"$",
"name",
",",
"$",
"parentGroup",
")",
"{",
"Assertion",
"::",
"assertTrue",
"(",
"$",
"this",
"->",
"getUserGroupManager",
"(",
")",
"->",
"checkUserGroupExistenceByName",
"(",
"$",
"name",
",... | @Then User Group with name :name exists in group :parentGroup
@Then User Group with name :name exists in :parentGroup group
Checks that a user group with name ':name' exists as a child of ':parentGroup' | [
"@Then",
"User",
"Group",
"with",
"name",
":",
"name",
"exists",
"in",
"group",
":",
"parentGroup",
"@Then",
"User",
"Group",
"with",
"name",
":",
"name",
"exists",
"in",
":",
"parentGroup",
"group"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/UserGroup.php#L144-L150 |
ezsystems/BehatBundle | Context/Object/UserGroup.php | UserGroup.assertUserGroupWithNameDoesntExistInGroup | public function assertUserGroupWithNameDoesntExistInGroup( $name, $parentGroup )
{
Assertion::assertFalse(
$this->getUserGroupManager()->checkUserGroupExistenceByName( $name, $parentGroup ),
"UserGroup with name '$name' was found in parent group '$parentGroup'."
);
} | php | public function assertUserGroupWithNameDoesntExistInGroup( $name, $parentGroup )
{
Assertion::assertFalse(
$this->getUserGroupManager()->checkUserGroupExistenceByName( $name, $parentGroup ),
"UserGroup with name '$name' was found in parent group '$parentGroup'."
);
} | [
"public",
"function",
"assertUserGroupWithNameDoesntExistInGroup",
"(",
"$",
"name",
",",
"$",
"parentGroup",
")",
"{",
"Assertion",
"::",
"assertFalse",
"(",
"$",
"this",
"->",
"getUserGroupManager",
"(",
")",
"->",
"checkUserGroupExistenceByName",
"(",
"$",
"name"... | @Then User Group with name :name doesn't exist in group :parentGroup
@Then User Group with name :name doesn't exist in :parentGroup group
Checks that a user group with name ':name' does not exist as a child of ':parentGroup' | [
"@Then",
"User",
"Group",
"with",
"name",
":",
"name",
"doesn",
"t",
"exist",
"in",
"group",
":",
"parentGroup",
"@Then",
"User",
"Group",
"with",
"name",
":",
"name",
"doesn",
"t",
"exist",
"in",
":",
"parentGroup",
"group"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/UserGroup.php#L158-L164 |
ezsystems/BehatBundle | Context/Object/UserGroup.php | UserGroup.findNonExistingUserGroupId | private function findNonExistingUserGroupId()
{
$userGroupManager = $this->getUserGroupManager();
for ( $i = 0; $i < 20; $i++ )
{
$id = uniqid('UserGroup#', true);
if ( !$userGroupManager()->checkUserGroupExistence( $id ) )
{
return $id;
... | php | private function findNonExistingUserGroupId()
{
$userGroupManager = $this->getUserGroupManager();
for ( $i = 0; $i < 20; $i++ )
{
$id = uniqid('UserGroup#', true);
if ( !$userGroupManager()->checkUserGroupExistence( $id ) )
{
return $id;
... | [
"private",
"function",
"findNonExistingUserGroupId",
"(",
")",
"{",
"$",
"userGroupManager",
"=",
"$",
"this",
"->",
"getUserGroupManager",
"(",
")",
";",
"for",
"(",
"$",
"i",
"=",
"0",
";",
"$",
"i",
"<",
"20",
";",
"$",
"i",
"++",
")",
"{",
"$",
... | Find an non existent UserGroup id
@return int Non existing id
@throws \Exception Possible endless loop | [
"Find",
"an",
"non",
"existent",
"UserGroup",
"id"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/UserGroup.php#L173-L186 |
ezsystems/BehatBundle | Context/Object/FieldType.php | FieldType.createContentTypeWithRequiredFieldType | public function createContentTypeWithRequiredFieldType( $fieldType, $name = null )
{
return $this->getFieldTypeManager()->createField( $fieldType, $name, true );
} | php | public function createContentTypeWithRequiredFieldType( $fieldType, $name = null )
{
return $this->getFieldTypeManager()->createField( $fieldType, $name, true );
} | [
"public",
"function",
"createContentTypeWithRequiredFieldType",
"(",
"$",
"fieldType",
",",
"$",
"name",
"=",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"getFieldTypeManager",
"(",
")",
"->",
"createField",
"(",
"$",
"fieldType",
",",
"$",
"name",
",",
"... | @Given a Content Type with a required :fieldType field exists
@Given a Content Type with a required :fieldType with field definition name :name exists
Creates a ContentType with only the desired FieldType | [
"@Given",
"a",
"Content",
"Type",
"with",
"a",
"required",
":",
"fieldType",
"field",
"exists",
"@Given",
"a",
"Content",
"Type",
"with",
"a",
"required",
":",
"fieldType",
"with",
"field",
"definition",
"name",
":",
"name",
"exists"
] | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/FieldType.php#L37-L40 |
ezsystems/BehatBundle | Context/Object/FieldType.php | FieldType.createContentOfThisType | public function createContentOfThisType( $field = null, $value = null )
{
return $this->getFieldTypeManager()->createContent( $field, $value );
} | php | public function createContentOfThisType( $field = null, $value = null )
{
return $this->getFieldTypeManager()->createContent( $field, $value );
} | [
"public",
"function",
"createContentOfThisType",
"(",
"$",
"field",
"=",
"null",
",",
"$",
"value",
"=",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"getFieldTypeManager",
"(",
")",
"->",
"createContent",
"(",
"$",
"field",
",",
"$",
"value",
")",
";"... | @Given a Content of this type exists
@Given a Content of this type exists with :field Field Value set to :value
@And a Content of this type exists
@And a Content of this type exists with :field Field Value set to :value
Creates a Content with the previously defined ContentType | [
"@Given",
"a",
"Content",
"of",
"this",
"type",
"exists",
"@Given",
"a",
"Content",
"of",
"this",
"type",
"exists",
"with",
":",
"field",
"Field",
"Value",
"set",
"to",
":",
"value",
"@And",
"a",
"Content",
"of",
"this",
"type",
"exists",
"@And",
"a",
... | train | https://github.com/ezsystems/BehatBundle/blob/7d6d409545ec7cb69a3ab6636a59159df033695d/Context/Object/FieldType.php#L50-L53 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.