35 $this->lng = $DIC->language();
36 $this->
user = $DIC->user();
39 $this->dirs = array(
"width",
"height");
44 $this->support_constraint_props = $a_val;
60 $this->width = $a_width;
80 $this->height = $a_height;
100 $this->constrainproportions = $a_constrainproportions;
110 return $this->constrainproportions;
122 foreach ($this->dirs as $dir) {
154 $tpl =
new ilTemplate(
"tpl.prop_width_height.html",
true,
true,
"Services/MediaObjects");
161 $tpl->setCurrentBlock(
"cs_prop");
162 $tpl->setVariable(
"TXT_CONSTR_PROP",
$lng->txt(
"cont_constrain_proportions"));
165 $tpl->setVariable(
"CHECKED",
'checked="checked"');
167 $tpl->setVariable(
"WH_RATIO", str_replace(
",",
".", round($wh_ratio, 6)));
168 $tpl->parseCurrentBlock();
171 foreach ($this->dirs as $dir) {
173 case "width":
$value = strtolower(trim($this->
getWidth()));
break;
176 $tpl->setVariable(
"VAL_" . strtoupper($dir),
$value);
182 $a_tpl->setCurrentBlock(
"prop_generic");
183 $a_tpl->setVariable(
"PROP_GENERIC",
$tpl->get());
184 $a_tpl->parseCurrentBlock();
186 $GLOBALS[
"tpl"]->addJavascript(
"./Services/MediaObjects/js/ServiceMediaObjectPropWidthHeight.js");
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
__construct(Container $dic, ilPlugin $plugin)
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl