Skip to content
Snippets Groups Projects
Verified Commit e8f54311 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

add attachment type only show true

parent c825000a
No related branches found
No related tags found
No related merge requests found
...@@ -131,12 +131,14 @@ abstract class AttachmentModelAbstract ...@@ -131,12 +131,14 @@ abstract class AttachmentModelAbstract
$attachmentTypesXML = $loadedXml->attachment_types; $attachmentTypesXML = $loadedXml->attachment_types;
if (count($attachmentTypesXML) > 0) { if (count($attachmentTypesXML) > 0) {
foreach ($attachmentTypesXML->type as $value) { foreach ($attachmentTypesXML->type as $value) {
$label = defined((string) $value->label) ? constant((string) $value->label) : (string) $value->label; if ((string)$value->attributes()->show == 'true') {
$attachmentTypes[(string) $value->id] = [ $label = defined((string) $value->label) ? constant((string) $value->label) : (string) $value->label;
'label' => $label, $attachmentTypes[(string) $value->id] = [
'icon' => (string)$value['icon'], 'label' => $label,
'sign' => (empty($value['sign']) || (string)$value['sign'] == 'true') ? true : false 'icon' => (string)$value['icon'],
]; 'sign' => (empty($value['sign']) || (string)$value['sign'] == 'true') ? true : false
];
}
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment