You are here

protected function BrowserRenderTrait::checkRenderOptions in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/jcalderonzumba/gastonjs/src/Browser/BrowserRenderTrait.php \Zumba\GastonJS\Browser\BrowserRenderTrait::checkRenderOptions()

Check and fix render options

Parameters

$options:

Return value

mixed

2 calls to BrowserRenderTrait::checkRenderOptions()
BrowserRenderTrait::render in vendor/jcalderonzumba/gastonjs/src/Browser/BrowserRenderTrait.php
Renders a page or selection to a file given by path
BrowserRenderTrait::renderBase64 in vendor/jcalderonzumba/gastonjs/src/Browser/BrowserRenderTrait.php
Renders base64 a page or selection to a file given by path

File

vendor/jcalderonzumba/gastonjs/src/Browser/BrowserRenderTrait.php, line 15

Class

BrowserRenderTrait
Trait BrowserRenderTrait @package Zumba\GastonJS\Browser

Namespace

Zumba\GastonJS\Browser

Code

protected function checkRenderOptions($options) {

  //Default is full and no selection
  if (count($options) === 0) {
    $options["full"] = true;
    $options["selector"] = null;
  }
  if (isset($options["full"]) && isset($options["selector"])) {
    if ($options["full"]) {

      //Whatever it is, full is more powerful than selection
      $options["selector"] = null;
    }
  }
  else {
    if (!isset($options["full"]) && isset($options["selector"])) {
      $options["full"] = false;
    }
  }
  return $options;
}