@param ChartOption|array $chartOption
@param string            $name

@return string
5220
protected function renderWithJavascriptCallback($chartOption, $name)
    {
        $result = "";

        if (gettype($chartOption) === 'array') {
            $result .= $this->renderArrayWithCallback($chartOption, $name);
        }

        if (gettype($chartOption) === 'object') {
            $result .= $this->renderObjectWithCallback($chartOption, $name);
        }

        return $result;
    }
1268185
public function setAxisOptions($axis, $name, $value)
    {
        if( strtolower($axis) === 'x' || strtolower($axis) === 'y' ) {
            $axis = strtolower($axis) . 'axis';

            if ( array_key_exists( $name, $this->nativeOpts[$axis] ) ) {
                $this->setNestedOptVal( $this->options, $axis, $name, $value );
            } else {
                $key = 'axes.'.$axis.'.'.$name;

                if ( isset( $this->optsMapper[$key] ) ) {
                    $this->setOpt($this->options, $this->optsMapper[$key], $value);
                }

                if ( $name == 'formatString' ) {
                    $this->options[$axis]['tickFormatter'] = $this->getCallbackPlaceholder('function(val, axis){return "'.$value.'".replace(/%d/, val);}');
                }

            }
        }

        return $this;
    }
748186
public final function getOption( string $name, $defaultValue = false )
   {

      if ( ! $this->hasOption( $name ) )
      {
         return $defaultValue;
      }

      return $this->_options[ $name ];

   }
741839
public function getOption($name)
    {
        $name = strtolower($name);
        if (array_key_exists($name, $this->options)) {
            return $this->options[$name];
        }
        return null;
    }
1096639
private function parseShortOptionSet($name) {
        $len = strlen($name);
        for ($i = 0; $i < $len; ++$i) {
            if (!$this->definition->hasShortcut($name[$i])) {
                throw new \RuntimeException(sprintf('The "-%s" option does not exist.', $name[$i]));
            }

            $option = $this->definition->getOptionForShortcut($name[$i]);
            if ($option->acceptValue()) {
                $this->addLongOption($option->getName(), $i === $len - 1 ? null : substr($name, $i + 1));

                break;
            }
            else {
                $this->addLongOption($option->getName(), null);
            }
        }
    }
134549
protected function renderObjectWithCallback($chartOption, $name)
    {
        $result = "";

        if (get_object_vars($chartOption)) {
            // Zend\Json is used in place of json_encode to preserve JS anonymous functions
            $result .= $name . ": " . Json::encode($chartOption, false, array('enableJsonExprFinder' => true)) . ",\n";
        }

        return $result;
    }
447379
public function getOption($name)
    {
        if (!$this->hasOption($name)) {
            throw new FieldException(sprintf('There\'s no option named "%s"', is_scalar($name) ? $name : gettype($name)));
        }
        return $this->options[$name];
    }
1057523
public function getOption($name) {
        if(!isset($this->options[$name])){
            throw new InvalidArgumentException(sprintf("The option name '%s' is invalid, available are %s.",$name, implode(",",array_keys($this->options))));
        }
        return $this->options[$name];
    }
485375
public static function text($name, $value = '', array $htmlOptions = [])
    {
    	return self::input('text', $name, $value) . self::htmlOptions($htmlOptions) .'>';
    }
498211
public function getOption($name = null)
    {
        if (null === $name) {
            return $this->options;
        } elseif (!array_key_exists($name, $this->options)) {
            throw new HTML_QuickForm2_NotFoundException(
                "Unknown option '{$name}'"
            );
        }
        return $this->options[$name];
    }
594018
public function getOptionalField(string $name) : string
    {
        if (isset($this->fields[$name])) {
            if ($this->fields[$name]) {
                return \array_shift($this->fields[$name]);
            }
        }

        return '';
    }
1336204
public function getOptionIdForName($name)
    {

        // query whether or not an option ID for the passed name is available
        if (isset($this->nameOptionIdMapping[$name])) {
            return $this->nameOptionIdMapping[$name];
        }

        // throw an exception, if not
        throw new \Exception(
            $this->appendExceptionSuffix(
                sprintf('Can\'t find option ID for name %s', $name)
            )
        );
    }
798243
public static function getOptions(string $name): array
    {
        if (isset(self::$options) && is_array(self::$options))
            return self::$options[$name];
        return [];
    }
374456
public function getProbeOption($name, $defaultOption = null)
    {
        $options = $this->getConfigArrayOption('probe', array());

        if (isset($options[$name])) {
            return $options[$name];
        }

        return $defaultOption;
    }
208441
public function withChart(string $chartName) : ChartWidgetDefiner
    {
        if (!isset($this->charts[$chartName])) {
            throw InvalidArgumentException::format(
                'Invalid chart name supplied to %s: expecting one of (%s), \'%s\' given',
                __METHOD__, Debug::formatValues(array_keys($this->charts)), $chartName
            );
        }

        return new ChartWidgetDefiner($this->name, $this->label, $this->authSystem, $this->requiredPermissions, $this->charts[$chartName], $this->callback);
    }
269040
protected function setOption(Array $options, $name, $method)
    {
        if (isset($options[$name])) {
            $this->$method($options[$name]);
        }
    }
707372
public static function preRender( \Altamira\Chart $chart, array $styleOptions = array() )
    {
    	if ( $chart->titleHidden() ) {
    		return '';
    	}
    	
        $tagType = isset( $styleOptions['titleTag'] ) ? $styleOptions['titleTag'] : 'h3';
        $title = $chart->getTitle();
        
        $output = <<<ENDDIV
<div class="altamira-chart-title">
    <{$tagType}>{$title}</{$tagType}>

ENDDIV;
        
        return $output;
    }