You are here

public function ReportEditor::editorLinks in Forena Reports 8

Same name and namespace in other branches
  1. 7.5 src/Editor/ReportEditor.php \Drupal\forena\Editor\ReportEditor::editorLinks()

File

src/Editor/ReportEditor.php, line 1155
ReportEditor.inc Wrapper XML class for working with DOM object. It provides helper Enter description here ... @author metzlerd

Class

ReportEditor

Namespace

Drupal\forena\Editor

Code

public function editorLinks() {
  $o = '';
  $report_link = $this->report_link;
  if (!$this->edit && forena_user_access_check('design any report')) {

    // Add the block or ID link
    $o .= '<div class="forena-editor-links">' . $this
      ->l_icon("{$report_link}/edit", 'pencil.svg', 'Edit', (array) FrxAPI::Data()
      ->getContext('parm'));
    if (\Drupal::moduleHandler()
      ->moduleExists('locale')) {
      $o .= $this
        ->l_icon("{$report_link}/translations", 'file.svg', 'Translations');
    }
    if (!$this->cache->include) {
      $o .= $this
        ->l_icon("{$report_link}/delete", 'minus.svg', 'Delete');
    }
    $o .= "</div>";
  }
  return $o;
}