$codes) { $algorithmName = 'DATAMATRIX' !== $algorithm ? $algorithm : 'DMATRIX'; // Test 1 $items[] = array( 'algorithm' => $algorithm, 'code' => $codes['long'], 'name' => $algorithmName.' '.$testBarcodesSettings['names']['long'], 'text' => '', 'text2' => '', 'showCode' => true, ); // Test 2 $items[] = array( 'algorithm' => $algorithm, 'code' => $codes['long'], 'name' => $algorithmName.' '.$testBarcodesSettings['names']['long'], 'text' => $testBarcodesSettings['texts1']['long'], 'text2' => $testBarcodesSettings['texts2']['long'], 'showCode' => true, ); // Test 3 $items[] = array( 'algorithm' => $algorithm, 'code' => $codes['long'], 'name' => '', 'text' => '', 'text2' => '', 'showCode' => false, ); // Test 4 $items[] = array( 'algorithm' => $algorithm, 'code' => $codes['long'], 'name' => '', 'text' => $testBarcodesSettings['texts1']['long'], 'text2' => $testBarcodesSettings['texts2']['long'], 'showCode' => false, ); // Test 5 $items[] = array( 'algorithm' => $algorithm, 'code' => $codes['short'], 'name' => $algorithmName.' '.$testBarcodesSettings['names']['short'], 'text' => $testBarcodesSettings['texts1']['short'], 'text2' => '', 'showCode' => false, ); // Test 6 $items[] = array( 'algorithm' => $algorithm, 'code' => $codes['short'], 'name' => '', 'text' => '', 'text2' => $testBarcodesSettings['texts2']['short'], 'showCode' => true, ); } } $this->items = $items; } protected function getFileOptions($itemData, $algorithm, $showCode) { return array( 'quantity' => 1, 'algorithm' => $itemData['algorithm'], 'field_code' => $itemData['code'], 'field_name' => $itemData['name'], 'field_text' => $itemData['text'], 'field_text_2' => $itemData['text2'], 'showCode' => $itemData['showCode'], ); } }