Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
All Data Structures Namespaces Files Functions Variables Pages
Priority.php
Go to the documentation of this file.
1 <?php
7 
8 class Priority extends \Magento\Framework\App\Config\Value
9 {
14  public function beforeSave()
15  {
16  $value = $this->getValue();
17  if ($value < 0 || $value > 1) {
18  throw new \Exception(__('The priority must be between 0 and 1.'));
19  } elseif ($value == 0 && !($value === '0' || $value === '0.0')) {
20  throw new \Exception(__('The priority must be between 0 and 1.'));
21  }
22  return $this;
23  }
24 }
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
__()
Definition: __.php:13
$value
Definition: gender.phtml:16