Esempio n. 1
0
 /**
  * @param array $records
  * @param array $inputToMerge
  * @return array
  */
 public function addSottoSezioni($records, $inputToMerge = array())
 {
     if (!empty($records)) {
         foreach ($records as &$record) {
             $wrapper = new SottoSezioniGetterWrapper(new SottoSezioniGetter($this->objectGetter->getEntityManager()));
             $wrapper->setInput(array_merge(array('sezioneId' => isset($record['id']) ? $record['id'] : null, 'orderBy' => 'sottosezioni.posizione', 'isSs' => 0), $inputToMerge));
             $wrapper->setupQueryBuilder();
             $record['sottosezioni'] = is_array($wrapper->getRecords()) ? $wrapper->getRecords() : null;
         }
         return $records;
     }
 }
Esempio n. 2
0
 public function testSetLingua()
 {
     $this->objectGetter->setLingua('it');
     $this->assertNotEmpty($this->objectGetter->getQueryBuilder()->getParameter('lingua'));
 }