function BookSettingsForm::filterAndSortAllowedTypes
Same name in other branches
- 10 core/modules/book/src/Form/BookSettingsForm.php \Drupal\book\Form\BookSettingsForm::filterAndSortAllowedTypes()
Transformation callback for the book_allowed_types config value.
Parameters
array $allowed_types: The config value to transform.
Return value
array The transformed value.
File
-
core/
modules/ book/ src/ Form/ BookSettingsForm.php, line 75
Class
- BookSettingsForm
- Configure book settings for this site.
Namespace
Drupal\book\FormCode
public static function filterAndSortAllowedTypes(array $allowed_types) : array {
$allowed_types = array_filter($allowed_types);
// We need to save the allowed types in an array ordered by machine_name so
// that we can save them in the correct order if node type changes.
// @see book_node_type_update().
sort($allowed_types);
return $allowed_types;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.