31 $this->lng = $DIC->language();
32 $this->
user = $DIC->user();
33 parent::__construct($a_title, $a_postvar);
35 $this->dirs =
array(
"width",
"height");
45 $this->width = $a_width;
65 $this->height = $a_height;
85 $this->constrainproportions = $a_constrainproportions;
95 return $this->constrainproportions;
107 foreach ($this->dirs as $dir) {
139 $tpl =
new ilTemplate(
"tpl.prop_width_height.html",
true,
true,
"Services/MediaObjects");
141 foreach ($this->dirs as $dir) {
143 case "width":
$value = strtolower(trim($this->
getWidth()));
break;
146 $tpl->setVariable(
"VAL_" . strtoupper($dir),
$value);
149 $tpl->setVariable(
"CHECKED",
'checked="checked"');
153 $tpl->setVariable(
"TXT_CONSTR_PROP",
$lng->txt(
"cont_constrain_proportions"));
158 $tpl->setVariable(
"WH_RATIO", str_replace(
",",
".", round($wh_ratio, 6)));
160 $a_tpl->setCurrentBlock(
"prop_generic");
161 $a_tpl->setVariable(
"PROP_GENERIC",
$tpl->get());
162 $a_tpl->parseCurrentBlock();
164 $GLOBALS[
"tpl"]->addJavascript(
"./Services/MediaObjects/js/ServiceMediaObjectPropWidthHeight.js");
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
special template class to simplify handling of ITX/PEAR
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Create styles array
The data for the language used.