예제 #1
0
 /**
  * @param \Magento\Eav\Helper\Data $eavData
  */
 public function __construct(\Magento\Eav\Helper\Data $eavData)
 {
     $this->_eavData = $eavData;
     //set data haystack
     $haystack = $this->_eavData->getInputTypesValidatorData();
     //reset message template and set custom
     $this->_messageTemplates = null;
     $this->_initMessageTemplates();
     //parent construct with options
     parent::__construct(['haystack' => $haystack, 'strict' => true]);
 }
예제 #2
0
 /**
  * Construct
  */
 public function __construct()
 {
     //set data haystack
     /** @var $helper Mage_Eav_Helper_Data */
     $helper = Mage::helper('eav');
     $haystack = $helper->getInputTypesValidatorData();
     //reset message template and set custom
     $this->_messageTemplates = null;
     $this->_initMessageTemplates();
     //parent construct with options
     parent::__construct(array('haystack' => $haystack, 'strict' => true));
 }
예제 #3
0
 /**
  * Creates the validator.
  */
 public function __construct()
 {
     $options = array('haystack' => array(true, false, 0, 1, '0', '1', 'true', 'false', 'yes', 'no'), 'strict' => true);
     parent::__construct($options);
 }