Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Property.php
Go to the documentation of this file.
1 <?php
10 
11 class Property extends \Magento\Framework\Validator\Constraint
12 {
18  protected $_property;
19 
27  public function __construct(\Magento\Framework\Validator\ValidatorInterface $validator, $property, $alias = null)
28  {
29  parent::__construct($validator, $alias);
30  $this->_property = $property;
31  }
32 
40  protected function _getValidatorValue($value)
41  {
42  $result = null;
43 
44  if ($value instanceof \Magento\Framework\DataObject) {
45  $result = $value->getDataUsingMethod($this->_property);
46  } elseif ((is_array($value) || $value instanceof \ArrayAccess) && isset($value[$this->_property])) {
48  }
49 
50  return $result;
51  }
52 
59  protected function _addMessages(array $messages)
60  {
61  $this->_messages[$this->_property] = $messages;
62  }
63 }
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
$value
Definition: gender.phtml:16
__construct(\Magento\Framework\Validator\ValidatorInterface $validator, $property, $alias=null)
Definition: Property.php:27
if(!trim($html)) $alias
Definition: details.phtml:20