Lines Matching refs:options

30     public $options             = array();
128 $options = array();
139 $options[substr($item, 0, $i)] = $value;
141 $options[$item] = true;
145 if (count($this->options) > 0) {
146 $options_clean = $this->cleanOptions($options);
148 $options_clean = $options;
171 * clean element options to only supported attributes, setting defaults if required
173 * @param $options options passed to element
174 * @return array of options supported with default set
176 protected function cleanOptions($data, $options = null)
180 if ($options == null) { $options = $this->options;
183 // Match DokuWiki passed options to syntax options
185 foreach ($options as $syntaxKey => $syntaxValue) {
187 if (array_key_exists('type', $options[$syntaxKey])) {
188 $type = $options[$syntaxKey]['type'];
287 if (array_key_exists('data', $options[$syntaxKey])) {
288 foreach ($options[$syntaxKey]['data'] as $choiceKey => $choiceValue) {
311 if (array_key_exists('option', $options[$syntaxKey]) && array_key_exists('data', $options[$syntaxKey])) {
312 $optionsCleaned[$options[$syntaxKey]['option']] = $options[$syntaxKey]['data'];
331 foreach ($options as $syntaxKey => $syntaxValue) {
332 if (array_key_exists('type', $options[$syntaxKey])) {
333 if (array_key_exists('data', $options[$syntaxKey]) && is_array($options[$syntaxKey]['data'])) {
334 foreach ($options[$syntaxKey]['data'] as $choiceKey => $choiceValue) {
351 if(array_key_exists('type', $options) === true
358 // Add in syntax options that are missing
359 foreach ($options as $optionKey => $optionValue) {
361 if (array_key_exists('default', $options[$optionKey])) {
362 switch ($options[$optionKey]['type']) {
364 $optionsCleaned[$optionKey] = filter_var($options[$optionKey]['default'], FILTER_VALIDATE_BOOLEAN);
367 $optionsCleaned[$optionKey] = filter_var($options[$optionKey]['default'], FILTER_VALIDATE_INT);
370 $optionsCleaned[$optionKey] = $options[$optionKey]['default'];
435 * @param $options options of syntax element. Options with key 'class'=true are automatically added
436 * @param $classes classes to build from options as array
438 * @param $optionsTemplate allow a different options template instead of $this->options (for findTags)
439 * @return a string of classes from options/classes variable
441 public function buildClass($options = null, $classes = null, $inclAttr = false, $optionsTemplate = null)
445 if (is_array($options)) {
448 if ($optionsTemplate == null) { $optionsTemplate = $this->options;
458 if (array_key_exists($class, $options) && $options[$class] !== false && $options[$class] != '') {
468 $s[] = $prefix . $class . ($options[$class] !== true ? '-' . $options[$class] : '');
553 public function buildTooltipString($options)
559 if ($options != null) {
560 if (array_key_exists('tooltip-html-top', $options) && $options['tooltip-html-top'] != '') {
561 $title = $options['tooltip-html-top'];
565 if (array_key_exists('tooltip-html-left', $options) && $options['tooltip-html-left'] != '') {
566 $title = $options['tooltip-html-left'];
570 if (array_key_exists('tooltip-html-bottom', $options) && $options['tooltip-html-bottom'] != '') {
571 $title = $options['tooltip-html-bottom'];
575 if (array_key_exists('tooltip-html-right', $options) && $options['tooltip-html-right'] != '') {
576 $title = $options['tooltip-html-right'];
580 if (array_key_exists('tooltip-top', $options) && $options['tooltip-top'] != '') {
581 $title = $options['tooltip-top'];
585 if (array_key_exists('tooltip-left', $options) && $options['tooltip-left'] != '') {
586 $title = $options['tooltip-left'];
590 if (array_key_exists('tooltip-bottom', $options) && $options['tooltip-bottom'] != '') {
591 $title = $options['tooltip-bottom'];
595 if (array_key_exists('tooltip-right', $options) && $options['tooltip-right'] != '') {
596 $title = $options['tooltip-right'];
600 if (array_key_exists('tooltip-html', $options) && $options['tooltip-html'] != '') {
601 $title = $options['tooltip-html'];
605 if (array_key_exists('tooltip', $options) && $options['tooltip'] != '') {
606 $title = $options['tooltip'];
657 * @param $data tag options to pass to syntax class. Runs through cleanOptions to validate first
671 if (count($class->options) > 0) {
672 $data = $class->cleanOptions($data, $class->options);
735 if (array_key_exists($option, $class->options) && array_key_exists('default', $class->options[$option])) {
736 return $class->options[$option]['default'];
784 * add common options to options
787 * @param $options save in options
794 $this->options['shadow'] = array(
803 $this->options['width'] = array(
810 $this->options['height'] = array(
817 $this->options['text-color'] = array(
824 $this->options['type'] = array(
833 $this->options['text-align'] = array(
842 $this->options['align'] = array(
851 $this->options['tooltip'] = array(
860 $this->options['vertical-align'] = array(
869 $this->options['links-match'] = array(
880 * Find HTML tags in string. Parse tags options. Used in parsing subtags
884 * @param $options parse options similar to syntax element options
886 * @return array of tags containing 'options' => array of 'name' => 'value', 'content' => content inside the tag
888 protected function findTags($tagName, $content, $options, $hasEndTag = true)
900 $item = array('options' => array(), 'content' => $this->render_text($match[2][$i]));
914 $item['options'][substr($option, 0, $j)] = $value;
916 $item['options'][$option] = true;
920 $item['options'] = $this->cleanOptions($item['options'], $options);