/**
  * @see \Zend\Form\Form::setData()
  */
 public function populateValues($data)
 {
     if (isset($data['currentIndicator']) && isset($data['endDate']) && $data['currentIndicator']) {
         // empty & hide endDate if currentIndicator is checked
         $data['endDate'] = '';
         $this->get('endDate')->setOption('rowClass', 'hidden');
     }
     return parent::populateValues($data);
 }
示例#2
0
文件: Form.php 项目: Flesh192/magento
 /**
  * {@inheritDoc}
  *
  * @param bool $onlyBase
  */
 public function populateValues($data, $onlyBase = false)
 {
     if ($onlyBase && $this->baseFieldset !== null) {
         $name = $this->baseFieldset->getName();
         if (array_key_exists($name, $data)) {
             $this->baseFieldset->populateValues($data[$name]);
         }
     } else {
         parent::populateValues($data);
     }
 }
示例#3
0
 public function populateValues($data)
 {
     $this->storedValue = $data;
     parent::populateValues($data);
 }