TYPO3 CMS  TYPO3_6-2
ScalableVectorGraphicsContentObject.php
Go to the documentation of this file.
1 <?php
3 
23 
30  public function render($conf = array()) {
31  $width = isset($conf['width.']) ? $this->cObj->stdWrap($conf['width'], $conf['width.']) : $conf['width'];
32  if (!$width) {
33  $width = 600;
34  }
35  $height = isset($conf['height.']) ? $this->cObj->stdWrap($conf['height'], $conf['height.']) : $conf['height'];
36  if (!$height) {
37  $height = 400;
38  }
39  $src = isset($conf['src.']) ? $this->cObj->stdWrap($conf['src'], $conf['src.']) : $conf['src'];
40  if (!$src) {
41  $src = NULL;
42  }
43  $value = isset($conf['value.']) ? $this->cObj->stdWrap($conf['value'], $conf['value.']) : $conf['value'];
44  $noscript = isset($conf['noscript.']) ? $this->cObj->stdWrap($conf['noscript'], $conf['noscript.']) : $conf['noscript'];
45  if ($src) {
46  $content = '
47 
48  <!--[if IE]>
49  <object src="' . $src . '" classid="image/svg+xml" width="' . $width . '" height="' . $height . '">
50  <![endif]-->
51  <!--[if !IE]>-->
52  <object data="' . $src . '" type="image/svg+xml" width="' . $width . '" height="' . $height . '">
53  <!--<![endif]-->
54  ' . $noscript . '
55  </object>
56 
57  ';
58  } else {
59  $content = '
60  <script type="image/svg+xml">
61  <svg xmlns="http://www.w3.org/2000/svg"
62  xmlns:xlink="http://www.w3.org/1999/xlink"
63  width="' . $width . '"
64  height="' . $height . '">
65  ' . $value . '
66  </svg>
67  </script>
68  <noscript>
69  ' . $noscript . '
70  </noscript>
71  ';
72  }
73  $GLOBALS['TSFE']->getPageRenderer()->loadSvg();
74  if (isset($conf['stdWrap.'])) {
75  $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
76  }
77  return $content;
78  }
79 
80 }
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]