Exemplo n.º 1
0
 /**
  * Details getter
  *
  * @param \XLite\Model\OrderHistoryEvents $event Event
  *
  * @return array
  */
 protected function getDetails(\XLite\Model\OrderHistoryEvents $event)
 {
     $list = array();
     $columnId = 0;
     foreach ($event->getDetails() as $cell) {
         if ($cell->getName()) {
             $list[$columnId][] = $cell;
             $columnId++;
         }
         if ($this->getColumnsNumber() <= $columnId) {
             $columnId = 0;
         }
     }
     return $list;
 }
 /**
  * {@inheritDoc}
  */
 public function prepareEntityBeforeCommit($type)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'prepareEntityBeforeCommit', array($type));
     return parent::prepareEntityBeforeCommit($type);
 }