'required|array', 'format' => 'required', 'hideCode' => 'boolean', ); /** * {@inheritdoc}. */ protected function getItems() { $this->items = $fieldsData = PostData::$postData['fields']; } /** * {@inheritdoc}. */ protected function getFileOptions($itemData, $algorithm, $showCode) { return array( 'quantity' => 1, 'field_code' => isset($itemData['code']['value']) ? $itemData['code']['value'] : '', // the field from which the barcode will be created 'field_name' => isset($itemData['name']['value']) ? $itemData['name']['value'] : '', // additional field 'field_text' => isset($itemData['text']['value']) ? $itemData['text']['value'] : '', // additional field 'field_text_2' => isset($itemData['text2']['value']) ? $itemData['text2']['value'] : '', // additional field 'algorithm' => $algorithm, // barcode algorithm 'showCode' => $showCode, // show/hide the code value on the image 'showName' => $this->showName, // show/hide the name value on the image 'showText' => $this->showText, // show/hide the text value on the image 'showText2' => $this->showText2, ); } }