Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Element.php
Go to the documentation of this file.
1 <?php
11 
17 {
26  public function is($var, $value = true)
27  {
28  $flag = $this->{$var};
29 
30  if ($value === true) {
31  $flag = strtolower((string)$flag);
32  if (!empty($flag) && 'false' !== $flag && 'off' !== $flag) {
33  return true;
34  } else {
35  return false;
36  }
37  }
38 
39  return !empty($flag) && 0 === strcasecmp($value, (string)$flag);
40  }
41 
47  public function getClassName()
48  {
49  if ($this->class) {
50  $model = (string)$this->class;
51  } elseif ($this->model) {
52  $model = (string)$this->model;
53  } else {
54  return false;
55  }
56  return $model;
57  }
58 }
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
$value
Definition: gender.phtml:16