class Forena in Forena Reports 8
Hierarchy
Expanded class hierarchy of Forena
2 files declare their use of Forena
- AjaxPageControllerBase.php in src/Controller/ AjaxPageControllerBase.php 
- ForenaTest.php in tests/src/ Unit/ ForenaTest.php 
8 string references to 'Forena'
- forena.info.yml in ./forena.info.yml 
- forena.info.yml
- forena.services.yml in ./forena.services.yml 
- forena.services.yml
- ForenaInegrationTest::getInfo in src/Tests/ ForenaInegrationTest.php 
- forena_pdf.info.yml in forena_pdf/forena_pdf.info.yml 
- forena_pdf/forena_pdf.info.yml
- forena_query.info.yml in forena_query/forena_query.info.yml 
- forena_query/forena_query.info.yml
1 service uses Forena
File
- src/Forena.php, line 11 
Namespace
Drupal\forenaView source
class Forena {
  use FrxAPI;
  protected static $instance;
  /**
   * Singleton
   * @return static
   */
  public static function service() {
    if (static::$instance === NULL) {
      static::$instance = new static();
    }
    return static::$instance;
  }
  public function report($report, $parms = []) {
    $content = ReportManager::instance()
      ->report($report, $parms);
    return $content;
  }
  public function setContext($id, $data) {
    $this
      ->setDataContext($id, $data);
  }
  /**
   * @param string $report
   *   Name of the report to run with format.
   * @param array $parms
   *   Parameters to apply to report
   * @return string
   *   The report text.
   */
  public function runReport($report, $parms = []) {
    $content = \Drupal\forena\ReportManager::instance()
      ->report($report, $parms);
    $d = \Drupal\forena\DocManager::instance();
    $doc_type = $d
      ->getDocumentType();
    $email_override = \Drupal::config('forena.settings')
      ->get('email_override');
    $user = \Drupal::currentUser();
    $email = $email_override ? $user
      ->getEmail() : '';
    switch ($doc_type) {
      case 'drupal':
        $content = $content['report']['#template'];
        break;
      case 'email':
        /** @var \Drupal\forena\FrxPlugin\Document\EmailMerge $merge */
        $merge = $d
          ->getDocument();
        $merge
          ->sendMail($email, 0);
        break;
    }
    return $content;
  }
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| Forena:: | protected static | property | ||
| Forena:: | public | function | Run a report with a particular format. Overrides FrxAPI:: | |
| Forena:: | public | function | ||
| Forena:: | public static | function | Singleton | |
| Forena:: | public | function | ||
| FrxAPI:: | public | function | Returns containing application service | |
| FrxAPI:: | public | function | Get the current data context. | |
| FrxAPI:: | public | function | ||
| FrxAPI:: | public | function | Returns the data manager service | |
| FrxAPI:: | public | function | Return Data Service | |
| FrxAPI:: | public | function | Returns the fornea document manager | |
| FrxAPI:: | public | function | Report an error | |
| FrxAPI:: | public | function | Get the context of a specific id. | |
| FrxAPI:: | public | function | Get the current document | |
| FrxAPI:: | public | function | Load the contents of a file in the report file system. | |
| FrxAPI:: | function | Enter description here... | 1 | |
| FrxAPI:: | public | function | Pop data off of the stack. | |
| FrxAPI:: | public | function | Push data onto the Stack | |
| FrxAPI:: | public | function | Get the current report file system. | |
| FrxAPI:: | public | function | Set Data context by id. | |
| FrxAPI:: | public | function | Change to a specific document type. | |
| FrxAPI:: | public | function | Get list of skins. | 
