Lines Matching refs:opts
52 $opts = array( // set default
71 $opts['display'] = $display;
81 $opts['zoom'] = $zoom;
92 $opts['height'] = preg_replace('/\s/', '', $size[0]);
96 $opts['width'] = preg_replace('/\s/', '', $size[0]);
97 $opts['height'] = preg_replace('/\s/', '', $size[1]);
101 if(is_numeric($opts['width'])) $opts['width'] .= 'px';
102 if(is_numeric($opts['height'])) $opts['height'] .= 'px';
104 $opts['id'] = trim($id);
105 if(!empty($title)) $opts['title'] = trim($title);
107 return array($state, $opts);
114 list($state, $opts) = $data;
115 if($opts['id'] == '') return false;
117 $html = $this->_html_embed_pdfjs($opts);
127 private function _html_embed_pdfjs($opts) { argument
130 $src .= '?file=' . rawurlencode(ml($opts['id']));
131 if($opts['display'] == 'tab') {
134 $html .= '>' . $opts['title'] . '</a>';
136 if($opts['zoom']) $src .= '#zoom=' . $opts['zoom'];
139 if($opts['width']) $html .= ' width: ' . $opts['width'] . ';';
140 if($opts['height']) $html .= ' height: ' . $opts['height'] . ';';