public function YamlFormAddonsManager::getProjects in YAML Form 8
Get add-on projects.
Parameters
string|null $category: (optional) Category to filter project by.
Return value
array An associative array of add-on projects.
Overrides YamlFormAddonsManagerInterface::getProjects
File
- src/
YamlFormAddonsManager.php, line 39
Class
- YamlFormAddonsManager
- Form add-ons manager.
Namespace
Drupal\yamlformCode
public function getProjects($category = NULL) {
$projects = $this->projects;
if ($category) {
foreach ($projects as $project_name => $project) {
if ($project['category'] != $category) {
unset($projects[$project_name]);
}
}
}
return $projects;
}