public static function FileType::loadEnabled in File Entity (fieldable files) 8.2
Loads and returns all enabled file types.
Parameters
bool $status: (optional) If FALSE, this loads disabled rather than enabled types.
Return value
FileTypeInterface[] An array of entity objects indexed by their IDs.
Overrides FileTypeInterface::loadEnabled
2 calls to FileType::loadEnabled()
- FileEntityPermissions::fileTypePermissions in src/
FileEntityPermissions.php - Generates standard file permissions for all applicable file types.
- file_entity_file_type in ./
file_entity.file.inc - Implements hook_file_type().
File
- src/
Entity/ FileType.php, line 117
Class
- FileType
- Defines the File type configuration entity.
Namespace
Drupal\file_entity\EntityCode
public static function loadEnabled($status = TRUE) {
$types = array();
foreach (self::loadMultiple() as $id => $type) {
if ($type->status == $status) {
$types[$id] = $type;
}
}
return $types;
}