public function getElementFiles(array $systemReferences, $formatAsHtml = true, $databaseConnectionName = null, $organizationId = null)
  {
    $files = array();

    if(empty($organizationId))
    {
      $organizationId = $this->AuthenticationManager->getCurrentUserOrganizationId();
    }

    foreach ($systemReferences as $systemReference)
    {
      $this->File->bySystemReferenceTypeBySystemReferenceIdAndByOrganization($this->journalConfigurations[$systemReference['appId']]['journalizedType'][0], $systemReference['systemReferenceId'], $organizationId, $databaseConnectionName)->each(function($File) use (&$files)
      {
        // array_push($files, array('id' => $File->id, 'name' => $File->name, 'size' => $this->Storage->size($File->system_route), 'url' => $File->url, 'icon' => str_replace('font-size: 2em;', '', $File->icon_html)));
        array_push($files, array('id' => $File->id, 'name' => $File->name, 'size' => 0, 'url' => $File->url, 'icon' => str_replace('font-size: 2em;', '', $File->icon_html)));
      });
    }

    return json_encode($files);
  }