You are here

class FrxXML in Forena Reports 7.5

Hierarchy

Expanded class hierarchy of FrxXML

File

src/Renderer/FrxXML.php, line 11
FrxXML Just render the XML source data. Look at the FrxRender class to see a full list of properties that can be used here.

Namespace

Drupal\forena\Renderer
View source
class FrxXML extends RendererBase {
  public function render() {
    $output = '';
    $node = $this->reportDocNode;
    $options = $this
      ->mergedAttributes();
    if (isset($options['context'])) {
      $xml = Frx::Data()
        ->getContext($options['context']);
    }
    else {
      $xml = FrxData::instance()
        ->currentContext();
    }
    if (is_array($xml)) {
      $xml = DataContext::arrayToXml($xml);
    }
    if ($xml && is_callable(array(
      $xml,
      'asXML',
    ))) {
      $dom = dom_import_simplexml($xml);
      $dom->ownerDocument->formatOutput = TRUE;
      $dom->ownerDocument->preserveWhiteSpace = TRUE;
      $output = $dom->ownerDocument
        ->saveXML($dom->ownerDocument->documentElement);
    }
    if ($this->format != 'xml') {
      $output = '<pre>' . htmlspecialchars($output) . '</pre>';
    }
    return $output;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FrxXML::render public function Default Render action, which simply does normal forena rendering. You can use renderDomNode at any time to generate the default forena rendering methods. Overrides RendererBase::render
RendererBase::$blockName public property
RendererBase::$blockParms public property
RendererBase::$columns public property
RendererBase::$dataProvider public property
RendererBase::$doc_types public property
RendererBase::$format public property
RendererBase::$frxAttributes public property
RendererBase::$frxReport public property
RendererBase::$htmlAttributes public property
RendererBase::$id public property
RendererBase::$input_format public property
RendererBase::$name public property
RendererBase::$numeric_columns public property
RendererBase::$reportDocDomNode public property
RendererBase::$reportDocNode public property
RendererBase::$xmlns public property
RendererBase::$xpathQuery public property
RendererBase::addAttributes public static function Helper function for convergint methods to a standard associated array.
RendererBase::addFragment function Append a textual XHTML fragment to the dom. We do not use the DOMDocumentFragment optioin because they don't properly import namespaces. .
RendererBase::addNode function Add a node to the existing dom element with attributes
RendererBase::addText function Add a text node to the current dom node.
RendererBase::arrayAttributes public function Puts attributes back in array format prior to rendering.
RendererBase::blockDiv public function Generate generic div tag.
RendererBase::columns public function Extract a list of columns from the data context.
RendererBase::configAjax public function Generate ajax configuration attributes for use in template configurtion forms.
RendererBase::configForm public function Returns the section Enter description here ... 7
RendererBase::configValidate public function Default configuration validator. Simply validates header and footer attributes. 7
RendererBase::drupalRender public function Render a drupal form in a forena template
RendererBase::extract public function Extract a configuration var removing it from the array
RendererBase::extractChildSource public function Get the textual representations of html for the configuration engine.
RendererBase::extractSource public function Get the textual representations of html for the configuration engine.
RendererBase::extractTemplateHTML public function Get the textual representations of html for the configuration engine.
RendererBase::extractXPath public function Extracts the inner html of all nodes that match a particular xpath expression.
RendererBase::extractXPathInnerHTML public function Extracts the inner html of all nodes that match a particular xpath expression.
RendererBase::generate public function Generate the template from the configuration. 8
RendererBase::idFromBlock public function Simple function to get id from node.
RendererBase::initReportNode public function This function is called to give the renderer the current conetxt in report rendering. It makes sure the renderer has the current DOM nodes dom documnent, and other attributes.
RendererBase::innerXML public function Return the inside xml of the current node
RendererBase::mergedAttributes public function Standard php array containing merged attributes Enter description here ...
RendererBase::removeChildren public function Rmove all the children of a dom node in the current report.
RendererBase::removeChildrenExcept public function Removes all chidren from the dome node expect those with a tagname specified by the the $tags argurment
RendererBase::renderChildren public function
RendererBase::renderDomNode public function Recursive report renderer Walks the nodes rendering the report.
RendererBase::replacedAttributes public function Gives the token replaced attributes of a node.
RendererBase::replaceTokens public function A helper function to allow replacement of tokens from inside a renderer wihout needing to understand the object
RendererBase::resetTemplate public function Starting at the current report node, this function removes all child nodes. It aso removes any FRX attributes on the current as well.
RendererBase::scrapeConfig public function Default method for extracting configuration information from the template. This just scrapes teh current child html as the template. 7
RendererBase::setAttributes public function Set FRX attributes.
RendererBase::setFirstNode public function Sets the first child element to a node and returns it. IF the node
RendererBase::validateTextFormats public function Helper funciton for validating text_format type controls.
RendererBase::weight_sort public function Sort a column list by weight.
RendererBase::weight_sort_comp public static function
RendererBase::xmlToValues public function Convert XML to key value pairs. This is used in support of graping to get specific key/value pairs in an array format suitable for passing off to php libraries.
RendererBase::__construct public function 2