Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // appcode[Vendor][Module]BlockAdminhtmlPointEditForm.php
- $balloonFieldset->addField(
- 'payment_types',
- 'checkboxes',
- [
- 'label' => __('Payment Types'),
- 'name' => 'payment_types',
- 'values' => [
- ['value' => '2','label' => 'Card'],
- ['value' => '3','label' => 'Cash'],
- ['value' => '4','label' => 'Prepaid'],
- ],
- ]
- );
- /**
- * Set payment_types
- *
- * @param array $paymentTypes
- * @return RoundropFrontPageApiDataPointInterface
- */
- public function setPaymentTypes($paymentTypes)
- {
- $stringTypes = implode(', ', $paymentTypes);
- return $this->setData(self::PAYMENT_TYPES, $stringTypes);
- }
- /**
- * Get payment types
- *
- * @return string|null
- */
- public function getPaymentTypes()
- {
- return explode(', ', $this->getData(self::PAYMENT_TYPES));
- }
- 'name' => 'payment_types',
- 'name' => 'payment_types[]',
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement