Beispiel #1
0
 public function editCustomRecord($parameters)
 {
     $parameters['langs'] = Lang::all();
     $parameters['groups'] = Group::all();
     $parameters['genres'] = array_map(function ($object) {
         $object->name = trans($object->name);
         return $object;
     }, config('pulsar.genres'));
     $parameters['treatments'] = array_map(function ($object) {
         $object->name = trans($object->name);
         return $object;
     }, config('pulsar.treatments'));
     $parameters['states'] = array_map(function ($object) {
         $object->name = trans($object->name);
         return $object;
     }, config('pulsar.states'));
     // get attachments elements
     $attachments = AttachmentLibrary::getRecords('crm', 'crm-customer', $parameters['object']->id_301, base_lang()->id_001);
     // merge parameters and attachments array
     $parameters['attachmentFamilies'] = AttachmentFamily::getAttachmentFamilies(['resource_id_015' => 'cms-article']);
     $parameters = array_merge($parameters, $attachments);
     return $parameters;
 }