36         string $a_postvar = 
""    40         $this->
lng = $DIC->language();
    41         $this->
user = $DIC->user();
    44         $this->main_tpl = $DIC->ui()->mainTemplate();
    49         $this->support_constraint_props = $a_val;
    59         $this->width = $a_width;
    69         $this->height = $a_height;
    79         $this->constrainproportions = $a_constrainproportions;
    90         $this->
setWidth($i[
"width"] ? (
int) $i[
"width"] : null);
    91         $this->
setHeight($i[
"height"] ? (
int) $i[
"height"] : null);
   101             "width" => (string) ($val[
"width"] ?? 
""),
   102             "height" => (string) ($val[
"height"] ?? 
""),
   103             "constr_prop" => (bool) ($val[
"constr_prop"] ?? 
false)
   111         $tpl = 
new ilTemplate(
"tpl.prop_width_height.html", 
true, 
true, 
"Services/MediaObjects");
   117         $ratio = str_replace(
",", 
".", round($wh_ratio, 6));
   119             $tpl->setCurrentBlock(
"cs_prop");
   120             $tpl->setVariable(
"TXT_CONSTR_PROP", 
$lng->
txt(
"cont_constrain_proportions"));
   121             $tpl->setVariable(
"CS_POST_VAR", $this->
getPostVar());
   123                 $tpl->setVariable(
"CHECKED", 
'checked="checked"');
   125             $tpl->parseCurrentBlock();
   126             $this->main_tpl->addOnLoadCode(
   127                 'prop_width_height["prop_' . $this->
getPostVar() . 
'"] = ' . $ratio . 
';'   131         $tpl->setVariable(
"VAL_WIDTH", strtolower(trim((
string) $this->
getWidth())));
   132         $tpl->setVariable(
"VAL_HEIGHT", strtolower(trim((
string) $this->
getHeight())));
   134         $tpl->setVariable(
"POST_VAR", $this->
getPostVar());
   141             ->addJavaScript(
"./Services/MediaObjects/js/ServiceMediaObjectPropWidthHeight.js");
   146         $w = $a_values[$this->
getPostVar()][
"width"] ?? 
false;
   147         $h = $a_values[$this->
getPostVar()][
"height"] ?? 
false;
   148         $this->
setWidth($w ? (
int) $w : null);
 parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
 
setVariable($variable, $value='')
Sets a variable value. 
 
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)