예제 #1
0
 /**
  * Initialize current flyweight
  *
  * @param array $element
  */
 protected function _initFlyweight(array $element)
 {
     $this->_flyweight->setData($element, $this->_scope);
 }
예제 #2
0
 public function testGetPathBuildsFullPath()
 {
     $this->_model->setData(array('path' => 'section/group', 'id' => 'fieldId'), 'scope');
     $this->assertEquals('section/group/prefix_fieldId', $this->_model->getPath('prefix_'));
 }
예제 #3
0
 /**
  * Set flyweight data
  *
  * @param array $data
  * @param string $scope
  */
 public function setData(array $data, $scope)
 {
     parent::setData($data, $scope);
     $children = array_key_exists('children', $this->_data) && is_array($this->_data['children']) ? $this->_data['children'] : array();
     $this->_childrenIterator->setElements($children, $scope);
 }