function RequirementsException::getRequirementsString
Same name in other branches
- 9 core/modules/migrate/src/Exception/RequirementsException.php \Drupal\migrate\Exception\RequirementsException::getRequirementsString()
- 10 core/modules/migrate/src/Exception/RequirementsException.php \Drupal\migrate\Exception\RequirementsException::getRequirementsString()
- 11.x core/modules/migrate/src/Exception/RequirementsException.php \Drupal\migrate\Exception\RequirementsException::getRequirementsString()
Get the requirements as a string.
Return value
string A formatted requirements string.
File
-
core/
modules/ migrate/ src/ Exception/ RequirementsException.php, line 55
Class
- RequirementsException
- Defines an exception thrown when a migration does not meet the requirements.
Namespace
Drupal\migrate\ExceptionCode
public function getRequirementsString() {
$output = '';
foreach ($this->requirements as $requirement_type => $requirements) {
if (!is_array($requirements)) {
$requirements = [
$requirements,
];
}
foreach ($requirements as $value) {
$output .= "{$requirement_type}: {$value}. ";
}
}
return trim($output);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.