Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Product.php
Go to the documentation of this file.
1 <?php
7 
9 {
15  public function loadAttributeOptions()
16  {
17  $this->setAttributeOption(['rule_price' => __('Special Price')]);
18  return $this;
19  }
20 
26  public function loadOperatorOptions()
27  {
28  $this->setOperatorOption(
29  [
30  'to_fixed' => __('To Fixed Value'),
31  'to_percent' => __('To Percentage'),
32  'by_fixed' => __('By Fixed value'),
33  'by_percent' => __('By Percentage'),
34  ]
35  );
36  return $this;
37  }
38 
44  public function asHtml()
45  {
46  $html = $this->getTypeElement()->getHtml() . __(
47  "Update product's %1 %2: %3",
48  $this->getAttributeElement()->getHtml(),
49  $this->getOperatorElement()->getHtml(),
50  $this->getValueElement()->getHtml()
51  );
52  $html .= $this->getRemoveLinkHtml();
53  return $html;
54  }
55 }
__()
Definition: __.php:13